Inside a Java program, how can I read the JAVA_HOME
variable (to be sure it is set the correct way)?
Similarly, how can I get the path of the bin
folder? That is, the path usually set in Windows via:
path %path%;%JAVA_HOME%\bin
Note: I am using the OpenJDK build by Alexkasko.
Try
String javaHome = System.getProperty("java.home");