wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 3817

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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: I think I might've broken something... (Command line/PATH question)
 
Similar Threads
How to point PATH envirnoment to /bin directory?
Problem with Chapter 5 - SimpleDotCom
Compiling a Servlet
trying to get started with head first java
Classpath not working