5
3
I want to copy some files in the subdirectories of the JVM path , java is already installed. How to know the JVM's path ?
5
3
I want to copy some files in the subdirectories of the JVM path , java is already installed. How to know the JVM's path ?
7
locate java
This will give you the location of java installation in your system.
Most probably it would be:
/usr/lib/java/
11
Check your $JAVA_HOME environment variable from a terminal:
echo $JAVA_HOME
5
In linux you can use the whereis and which shell commands.
which java
whereis java
which will give you the jre path in /usr/bin folder which will be /usr/bin/java most probably. This is not the actual jre file but it's just a symbolic link to the actual jre file which is located else where. To know the actual jre path you will have to write
readlink -f /usr/bin/java
or whatever was the path of jre returned by which/whereis command.
This is the only thing that works. – milosmns – 2017-12-09T00:39:13.040
-3
which java
This is the simplest command and gives the exact path.
This answer is not correct because it shows the path of the java
binary, which will most likely be /usr/bin/java
or something of that sort, which is different from the actual path of the JRE. – oldmud0 – 2017-01-19T00:17:40.843
1This is what I am trying to set using the located path :) – milosmns – 2017-12-09T00:37:59.580