I am trying to set java path on my windows 8.1, and i installed jdk 8u 64 bit and in environmental variables under system variables there is no PATH found,so i incuded new path variable to set path for jdk and jre ,by copying the bin path of jdk C:\Program Files (x86)\Java\jdk1.8.0_40\bin and i appended jre path C:\Program Files (x86)\Java\jre1.8.0_40,but it doesnt work when i tried in command prompt by typing "java -version"
and "javac" it says that java is not a internal or external command. and i had a doubt that to run java through command prompt ,do we need any other installations like turbo c
please help me out to set path in my pc,i am a begginer of java
javac is not part of jre, but part of jdk. So have
C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\Java\jre1.8.0_40\bin in the path. As Anand noted, the
; is missing as well.
This path is wrong -
C:\Program Files (x86)\Java\jdk1.8.0_40C:\Program F iles (x86)\Java\jre1.8.0_40\bin
you need a
; in between the two different paths.
Try adding this instead -
C:\Program Files (x86)\Java\jdk1.8.0_40\bin;C:\Program F iles (x86)\Java\jre1.8.0_40\bin
If you are trying to add the path in the user variables
JAVA_HOME don't add any semicolan (
in the path section end of the line add
;.; to consider all paths and save. Then try to restart system and open the command prompt and try to check
JAVA_HOME AND PATH