Contents
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.6.0_04.
- save the file.
- source ~/.bashrc OR source ~/.bash_profile.
- Execute : echo $JAVA_HOME.
- Output should print the path.
How do I permanently set my Java path in Linux?
To Set PATH on Linux
- 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.
- Save the file and exit. Use the source command to force Linux to reload the .bashrc file which normally is read only when you log in each time.
How do I set Java_home in Linux?
To Install the JDK Software and Set JAVA_HOME on a UNIX System
- To set JAVA_HOME, do one of the following: For Korn and bash shells, run the following commands: export JAVA_HOME= jdk-install-dir. export PATH=$JAVA_HOME/bin:$PATH.
- Change the permissions to enable you to run the GlassFish ESB Installer by running the following command: chmod 755 JavaCAPS.bin.