How to get the location of JRE?

Get path to java JRE

  • It it possible to get the location of the jre that is used for the current process. Need to launch an other java application as a separate process. Having different jre's available (and no path variable set) I would like ask eg. the loader for this. Running on Solaris, Linux, Windows.

  • Answer:

    You can use: System.getProperty("java.home") http://download.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties%28%29 says: java.home: Java installation directory

owan at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

System.getProperty("java.home")

hilal

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.