`

PATH and java.library.path CLASSPATH and java.class.path

阅读更多

PATH is the environment variable.

java.library.path is the system properties.

 

When the java application started, JVM will set java.library.path’s value using PATH’s value.

In java program, it's very difficult to get the value of environment variables, but it's very easy to get/set system properties. Use

System.getProperty("project_root", "..");

System.setProperty("project_root", "..");

 

The same relationship between CLASSPATH and java.class.path

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics