how to find jdk path in ubuntu?

Ads
 

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.. Thanks:

View Answers

January 11, 2019 at 10:33 AM

HI,

You can use following command to see the current java version:

which java

To find complete path run following command:

readlink -f $(which java)

Thanks


January 11, 2019 at 10:34 AM

Hi,

You can also use the following command:

whereis java

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
[email protected]:~$

Thanks


January 11, 2019 at 10:35 AM

Hi,

You may also use following command:

echo 'System.out.println(java.lang.System.getProperty("java.home"));' | jshell  -

Thanks

Ads









Related Tutorials/Questions & Answers:
how to find jdk path in ubuntu?
How to find unweighted Path with Less weighted path in java?
Advertisements
How to uninstall JDK 7?
should i reboot physical server to change the JDK path in linux server
How to install JDK in Centos?
How to download JDK source code?
how to set class path
How to install JDK 7 in windows
How to give path to the Dfile?
How to get project path
How to get project path
jdk
How to store url path?
How to download JDK 1.6?
How to uninstall JDK from Ubuntu 16.04?
How to get path of a file in iOS?
Installing JDK 7 on Windows
How to store url path in file ?
How to install Oracle JDK 8 on Ubuntu?
how to get java path name
How to change uploaded file root path ?
How to find hashtable size in Java?
how to insert the physical path of an image in database - JDBC
How to Find PHP version and configuration?
how to find the given date is sunday
How to find run time in SQL.
How to find a servlet object by name?
How to find maximum value in ArrayList
How to find maximum value in ArrayList
How to find maximum value in ArrayList
How to find maximum value in ArrayList

Ads