This small article will describe how to set the Java Path in Linux.
- Open '/etc/profile' file
- Add following line at the end of this file
- export JAVA_HOME=/usr/java/jdk1.6.0_33 export PATH=$PATH:/usr/java/jdk1.6.0_33/bin
- Change the path of JDK as per your installation
- This should set the path
- If it is not solving your problem,
- Open '/etc/bashrc' file
- Add following line at the end of this file
- export JAVA_HOME=/usr/java/jdk1.6.0_33
export PATH=$PATH:/usr/java/jdk1.6.0_33/bin - Change the path of JDK as per your installation
- If it still does not resolve the motive,
- Open directory '/etc/profile.d'
- Create a file 'java.sh' here (if it is not there)
- Add following lines to this file
- JAVA_HOME=/usr/java/jdk1.6.0_33
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME
export PATH
0 comments:
Post a Comment