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