How Do I Find the Default Java Path in Linux?
Contents the Actual Directory Is Java-11-Openjdk-Amd64, with Another Symlink of Default-Java. How Do I Find My Java Path? Open a Command Prompt Window (Win⊞ +...
Contents
The actual directory is java-11-openjdk-amd64 , with another symlink of default-java .
How do I find my java path?
Open a Command Prompt window (Win⊞ + R, type cmd, hit Enter). Enter the command echo %JAVA_HOME% . This should output the path to your Java installation folder.
Must Read
How do I change the default java path in Linux?
Steps
- Change to your home directory. cd $HOME.
- Open the . bashrc file.
- Add the following line to the file. Replace the JDK directory with the name of your java installation directory. export PATH=/usr/java/<JDK Directory>/bin:$PATH.
- Save the file and exit. Use the source command to force Linux to reload the .