how to find jdk path in ubuntu?
How to find out the path of installed jdk in ubuntu? Could anyone tell that command to execute from terminal..
January 11, 2019 at 10:33 AM
You can use following command to see the current java version:
To find complete path run following command:
readlink -f $(which java)
January 11, 2019 at 10:34 AM
You can also use the following command:
Here is the output of the command:
[email protected]:~$ whereis java
java: /usr/bin/java /usr/share/java /usr/lib/jvm/java-8-oracle/bin/java /usr/lib/jvm/java-8-oracle/jre/bin/java /usr/share/man/man1/java.1.gz
January 11, 2019 at 10:35 AM
You may also use following command:
echo 'System.out.println(java.lang.System.getProperty("java.home"));' | jshell -
Related Tutorials/Questions & Answers: