Setting JAVA_HOME in Linux
We need to set JAVA_HOME a lot of times in linux. Here is the procedure for setting JAVA_HOME in linux (i tested this only on Ubuntu, but i think, it should work in all linux distributions).
To Set JAVA_HOME:
Step 1: Open Terminal
Step2: as sudo, open /etc/bash.bashrc file (sudo gives administrative privilege to user in Ubuntu, for other linux distributions type su then hit enter, it will ask for root password, enter the password and then open /etc/bash.bashrc file)
Step3: add following lines at the end of the file:
JAVA_HOME=/usr/lib/jvm/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
Step4: Reboot the computer.
For checking, if JAVA_HOME is set or not, in terminal type:
echo $JAVA_HOME and hit enter, if you get: /usr/lib/jvm/java or /usr/lib/jvm/java* (java* means something after java) then you have set JAVA_HOME correctly and... ... read more >>> tarunsays.wordpress.com
Similar entries
- Set up Tomcat web server in Linux
- Setting PATH or Environment Variables on Linux
- Setting Environment variable in Linux
- [LINUX]export variables on /etc/profile.local
- Install Sun Java and Tomcat on CentOS 5
- Cara install java di Ubuntu
- Instalando e Configurando o Java (JDK) no Ubuntu 8.04
- setting path java di linuxmint
- SETUP APACHE-TOMCAT
- Install Java-SDK di Ubuntu
