• Post Reply Bookmark Topic Watch Topic
  • New Topic

I still cant set the path for java.  RSS feed

 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone.

i read beginning java faq and did set the path for java. but still it does not work. kindly help.


when i type java-version or javac-version, it says:
java-version or javac-version is not recognized as internal or external command.

when i type java, the long list of statements come.

.
i am new to programming and expect to get help.

thank you every one.
 
Dave Tolls
Ranch Foreman
Posts: 3068
37
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's java -version, with a space between the 'a' and the '-'.
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much . its working now.

but still javac -version not working. Am i doing some thing wrong there also?
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by not working?
Are you getting 'javac' is not recognized as an internal or external command?

Try executing echo %PATH% and show us the result.
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i thought that it will also show some version.
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
echo %path% shows :

%JAVA_HOME%\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

is it ok?
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, now it's time for echo %JAVA_HOME%.
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BY TYPING echo %JAVA_HOME% it says

c:\program files\java\jdk1.8.-_72
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where do you have Java installed? Is it c:\program files\java\jdk1.8.-_72?
Please try dir "c:\program files\java\jdk1.8.-_72\bin".
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BY TYPING echo %JAVA_HOME% it says

c:\program files\java\jdk1.8.0_72

sorry i typed it wrong.

installed it in :c:\program files\java\jdk1.8.0_72\bin
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you execute dir "c:\program files\java\jdk1.8.0_72\bin"?
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did not understand that. does it mean getting in that folder in command line? sorry for the trouble.
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means typing exactly what I wrote.
dir "c:\program files\java\jdk1.8.0_72\bin"
This command will print the content of c:\program files\java\jdk1.8.0_72\bin directory.
Just to make sure the executables are where you expect them to be.
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes . i was able to execute that.

c:\program files\java\jdk1.8.0_72\bin

i got into the folder in the command line.

java -version is being displayed.
but javac -version says: 'javac' is not recognized as an internal or external command?
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And what about this one?
"c:\program files\java\jdk1.8.0_72\bin\javac" -version
 
Knute Snortum
Sheriff
Posts: 4287
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you execute this?

"c:\program files\java\jdk1.8.0_72\bin\javac" -version
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. it says: java version "1.8.0_72"


here javac -version is also being displayed as : javac 1.8.0_72
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so does that mean it is all correctly set?
 
Akhil Mishra
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. I appreciate your patience.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!