Frequent Question: How Do I Find the Path to Java in Linux?
Contents How Do I Find My Java Path in Linux? Linux Check If Java_Home Is Already Set, Open Console. … Make Sure You Have Installed Java Already. Execute: Vi...
Contents
How do I find my java path in Linux?
Linux
- Check if JAVA_HOME is already set , Open Console. …
- Make sure you have installed Java already.
- Execute: vi ~/.bashrc OR vi ~/.bash_profile.
- add line : export JAVA_HOME=/usr/java/jre1.8.0_04.
- save the file.
- source ~/.bashrc OR source ~/.bash_profile.
- Execute : echo $JAVA_HOME.
- Output should print the path.
Must Read
How do I find my java path?
Verify JAVA_HOME
- 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. If it doesn’t, your JAVA_HOME variable was not set correctly.