Hey guys, just finished a big project in school programming lego nxt robots and for the whole project i used notepad++ instead of netbeans as it really made me know my stuff. I liked compiling with the command line and am trying to do the same with java, i read online to add C:\Program Files\Java\jdk1.7.0_01\bin to the beginning of my system environment variable "path", i tried both path for the system and for the user, but the directions i was looking at were vista. I can't find anything post-vista on how to make this work, in the command line java -version correctly displays my version, but javac -version gives me nothing. Can anyone educate me on how to set this up?
Thanks.
Javac in cmd
Page 1 of 17 Replies - 402 Views - Last Post: 09 May 2012 - 10:21 PM
Replies To: Javac in cmd
#3
Re: Javac in cmd
Posted 09 May 2012 - 08:59 PM
Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\BMEdwards37>java -version
java version "1.7.0_01"
Java SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot 64-Bit Server VM (build 21.1-b02, mixed mode)
this is what i get when i try a javac
C:\Users\BMEdwards37\Documents\NXTbots>javac SoundMaker.java
'javac' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\BMEdwards37\Documents\NXTbots>
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\BMEdwards37>java -version
java version "1.7.0_01"
Java SE Runtime Environment (build 1.7.0_01-b08)
Java HotSpot 64-Bit Server VM (build 21.1-b02, mixed mode)
this is what i get when i try a javac
C:\Users\BMEdwards37\Documents\NXTbots>javac SoundMaker.java
'javac' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\BMEdwards37\Documents\NXTbots>
#4
Re: Javac in cmd
Posted 09 May 2012 - 10:10 PM
Stupid question: do you have a javac.exe in
C:\Program Files\Java\jdk1.7.0_01\bin
C:\Program Files\Java\jdk1.7.0_01\bin
#5
Re: Javac in cmd
Posted 09 May 2012 - 10:15 PM
Yessir.
Must be a problem with my path. "C:\Program Files\java\jdk1.7.0_01\bin\javac" [file] worked.
Must be a problem with my path. "C:\Program Files\java\jdk1.7.0_01\bin\javac" [file] worked.
#6
Re: Javac in cmd
Posted 09 May 2012 - 10:17 PM
OK javac or path problem ?
> cd \Program Files\Java\jdk1.7.0_01\bin
> javac -version
> cd \Program Files\Java\jdk1.7.0_01\bin
> javac -version
#7
Re: Javac in cmd
Posted 09 May 2012 - 10:18 PM
forgot the semicolon separating the default from java when adding to path, i figured it out. or rather you guided me enough that i could figure it out. Thank you sir.
#8
Re: Javac in cmd
Posted 09 May 2012 - 10:21 PM
Sorry, haven't correctly your previous post
Post the output of
> echo %path%
must be something stupid
*Edited: OK fixed. Glad I could help
Post the output of
> echo %path%
must be something stupid
*Edited: OK fixed. Glad I could help
This post has been edited by pbl: 09 May 2012 - 10:22 PM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|