This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I think I might've broken something... (Command line/PATH question)

 
Cody Czora
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, I'm just getting back into Java after an AP CSci class in high school, only now with a command prompt instead of an IME, but problems ensued, and Head First Java doesn't really give much explanation in the matter.

So, without further ado:
Source directory: C:\Program Files\Java\jdk1.6.0_13\bin
File directory: C:\Users\Cody\Documents\Java\PP1.java
PATH: C:\Program Files\Java\jdk1.6.0_13\bin
CLASSPATH: C:\Program Files\Java\jdk1.6.0_13\bin

If I type:
C:\Users\Cody\Documents\Java>javac PP1.java

cmd gives me the "javac is not recognized as an internal or external command...etc" error, even though I'm pretty sure that I've set PATH correctly.

Is PATH wonky, or is it something fixed with a reboot?
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is displayed when you type just path with no arguments and hit enter?

Secondly the CLASSPATH need not be set to the Java\bin directory, its supposed to be pointing to the directory where your application's required class files are stored.

And setting the path does not require a reboot. Reboot actually wipes it out.
 
Cody Czora
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PATH is set to:
C:\Windows\System32; C:\Windows;...; C:\Program Files\QuickTime\QTSystem\
with no source dir, which is strange, as it's set properly through the Control Panel...

Thanks for the tip about rebooting; I wouldn't want to lose any of my last 2 hours of work.
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cody Czora wrote:PATH is set to:
C:\Windows\System32; C:\Windows;...; C:\Program Files\QuickTime\QTSystem\
with no source dir, which is strange, as it's set properly through the Control Panel...


In that path somewhere does it points to bin directory in your JDK ? If not the path is not set. Also you need a new cmd prompt for the changes to take effect.
 
Cody Czora
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All right, it's working now; thanks everyone!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic