应该是调用本地操作系统的东西,估计是文件

解决方案 »

  1.   

    引用First of all, Properties is a java class that is used to hold properties that maybe needed for your program. The basic properties that you are talking about are provided by the operating system. Not all of these can be changed. If you try, you will get a SecutrityException (You can't change the os.name for instance). The basic properties are read from the memory of the computer (basically) you can add additional variables to this by setting environment variables in the operating system you are using. Such as in Win95 you can add to the autoexec.bat the line:
    set BARTENDER_NAME=Carl
    This line can go in any batch file and BARTENDER_NAME will equal Carl until you reset it.
    In your java program If you add the line
    System.out.println(System.getProperty("BARTEDER_NAME"));
    You'll get Carl as the output.
    In the bash shell on Linux or Unix you'd use
    BARTENDER_NAME=Carl
    export BARTENDER_NAME