Java System Environment Variable

前端 未结 2 796
悲哀的现实
悲哀的现实 2020-12-17 23:38

Does Java have a default System Environment Variable that will always be read/appended when we set it? CATALINA_OTPS/JAVA_OPTS etc seems only for T

2条回答
  •  轮回少年
    2020-12-18 00:36

    Java has a standard OS system environment variable that is always set when the JVM is launched:

    • os.name
    • os.arch
    • os.version

    All accessible via 'System.getProperty(propertyName)`

    If you need anything more than this you could always use the Management API.

提交回复
热议问题