Find JDK Installation Directory in Linux

To view the installation directory of JDK in Linux, you can use the following command:

echo $JAVA_HOME

This command will display the installation directory of Java in the current system. If the JAVA_HOME environment variable is not set, you can use the following command to find the installation path of Java:

which java

This command will display the path of the Java executable file, typically the Java installation directory will be in the parent directory of this path.

bannerAds