• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

I still cant set the path for java.

 
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.
 
Master Rancher
Posts: 4668
49
  • 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?
 
Bartender
Posts: 2233
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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: 2233
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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: 2233
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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: 2233
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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: 2233
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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: 2233
63
IntelliJ IDE Firefox Browser Spring Java Linux
  • 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
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • 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.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic