File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Path & Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Path & Classpath" Watch "Path & Classpath" New topic

Path & Classpath


Joined: Feb 01, 2002
Posts: 3
I am extremely knew to all this, and I see someone has touched on this before but..
I'm trying to get the HelloWorld program to work, and I keep getting a bad command or file name error.
My autoexec looks like:
My Classpath=c:\jkd1.3.1_02\lib;.;c:\java
I type in at the c:\java prompt "javac" and get that bad command error.
What am I doing wrong?
Bhushan Jawle
Ranch Hand

Joined: Nov 22, 2001
Posts: 249
That error just means javac is not in your path, try including "your_jdk_directory\bin" in your path (where your_jdk_directory is susbtituted by appropriate path )

Joined: Feb 01, 2002
Posts: 3
I don't understand, from the path that I showed above isn't the jdk directory\bin in my path already?
Does it have any correspondence to explorer, I have the jdk directory stored under folders c:\java\jdk...
What am I missing?
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
If you want to compile your path should point to the c:/java/jdk1.3.1_02/bin where the javac.exe program is stored. (I think that is where you said that you put it.) You will need to change all your classpath and path references to show that it is a directory lower than you are saying now.

Also zach,
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please re-register under an appropriate name as shown in the policy. Your display name should have two names separated by a space and not obviously fictitious.
Thanks again and we hope to see you around the ranch!!

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: Path & Classpath
It's not a secret anymore!