This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes I think I might've broken something... (Command line/PATH question) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "I think I might Watch "I think I might New topic
Author

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

Cody Czora
Greenhorn

Joined: Mar 26, 2009
Posts: 3
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

Joined: Jun 06, 2007
Posts: 2716
    
    6

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.


SCJP, SCWCD.
|Asking Good Questions|
Cody Czora
Greenhorn

Joined: Mar 26, 2009
Posts: 3
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

Joined: Mar 24, 2008
Posts: 3826

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.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Cody Czora
Greenhorn

Joined: Mar 26, 2009
Posts: 3
All right, it's working now; thanks everyone!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I think I might've broken something... (Command line/PATH question)