7 Replies - 402 Views - Last Post: 09 May 2012 - 10:21 PM Rate Topic: -----

#1 BMEdwards37  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 06-December 11

Javac in cmd

Posted 09 May 2012 - 08:46 PM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Javac in cmd

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

Re: Javac in cmd

Posted 09 May 2012 - 08:53 PM

Is
> java -version gives 1.7.0_01 ?
Was This Post Helpful? 0
  • +
  • -

#3 BMEdwards37  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 06-December 11

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>
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

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
Was This Post Helpful? 1
  • +
  • -

#5 BMEdwards37  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 06-December 11

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.
Was This Post Helpful? 0
  • +
  • -

#6 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

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
Was This Post Helpful? 1
  • +
  • -

#7 BMEdwards37  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 06-December 11

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.
Was This Post Helpful? 0
  • +
  • -

#8 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8032
  • View blog
  • Posts: 31,202
  • Joined: 06-March 08

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

This post has been edited by pbl: 09 May 2012 - 10:22 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1