| Author |
javac not recognized
|
jith jitha
Greenhorn
Joined: Jul 27, 2009
Posts: 1
|
|
Hi. I just installed JDK 1.6.0_14 and i cannot seem to figure out a specific problem. I am trying to test a file that was created, and type in the command 'javac Filename.java' , I receive and error:
"'javac' is not recognized as an internal or external command, operable program or batch file."
There were no problems encountered in the installation process , so I do not know what is the problem.
If anyone can tell me how to fix the problem, it will be appreciated.
Thank you
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
|
you need to set the classpath
|
My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
See this link on how to set the classpath
HowToSetTheClasspath
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
Forgot to say this :
Welcome to coderanch !!
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
It's not the class path that needs to be set, but the PATH. The instructions are the same; just don't overwrite the PATH but add to the end.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
Sorry, my bad
yes its the path variable that needs to be set.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
|
|
|
And don't set the CLASSPATH. More details about that error in the Java™ Tutorials and the installation instructions.
|
 |
salvin francis
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
Classpath not required at all ?
What if the application is using components such as swing ?
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Swing is part of the core libraries these days.
I think what Campbell is trying to say is: don't use a global class path, but set the class path using the "-cp" / "-classpath" flags as needed.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
|
|
Rob Prime wrote:I think what Campbell is trying to say is: don't use a global class path, but set the class path using the "-cp" / "-classpath" flags as needed.
Yes, you are right Rob. Sorry I wasn't clear. The only intance when you have to edit a system classpath is if there already is a system classpath, in which case it needs to have a . added somewhere.
|
 |
 |
|
|
subject: javac not recognized
|
|
|