i am using WLS 10.3.6 and my java - version = jDK 1.7 and as per export ,i am confusing more…
in my case
$ echo $PATH
This is the output i got ..what is path, class path and meaning for my above path ??? reply me to at '**email@example.com**"
Use the following ‘which’ command to find out exact location of java executable under UNIX / Linux:
$ which java
Then, set **JAVA_HOME** path using following export command. Don't forget to mention correct location of your Java..
$ export PATH=$PATH:/path-to-java/
These are path to system and application binaries. You should not edit/overwrite them unless you know what you are doing.
I Assume Java is installed at /opt/java/jdk1.7.0_67/ directory. Change it as per your installation.
To set Java Path
# export PATH=$PATH:/opt/java/jdk1.7.0_67/bin:/opt/java/jdk1.7.0_67/jre/bin
If You are not using jre or do not want to set jre path use only
# export PATH=$PATH:/opt/java/jdk1.7.0_67/bin
The first part $PATH ensures rest of the system paths remains unchanged.
To set Java Environmental Variable
# export JAVA_HOME=/opt/java/jdk1.7.0_67/
# export JRE_HOME=/opt/java/jdk1.7.0_67/jre
The current release of Java is Java 8 Update 45 (jdk1.8.0_45). It is recommended to update/install latest Java Version. Here is the link to install Java in Linux, the easiest way : http://www.tecmint.com/install-java-jdk-jre-in-linux/