This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes 'javac' is not recognized as an internal or external command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

'javac' is not recognized as an internal or external command

layla peters
Greenhorn

Joined: Sep 26, 2009
Posts: 2
sorry if this has been asked before, i did a scan of the last few pages, if it was there i missed it. Obviously complete noob here...

installed java_ee_sdk-5_07-jdk-6u16-windows.exe on xp

'javac' is not recognized as an internal or external command.
and
exception in thread "main" java.lang.NoClassDefFoundError:

all google results point to wrong PATH environment variable, but what's there is C:\Sun\SDK\bin, that's as it was when installed.
theres no javac.exe in there, theres a javac.exe in C:\Sun\SDK\jdk\bin, but directing the environment variable there didnt seem to help.

can see i have a long way to go before i figure out what im doing :P
any suggestions?
thanks
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

layla peters wrote:sorry if this has been asked before, i did a scan of the last few pages, if it was there i missed it. Obviously complete noob here...

installed java_ee_sdk-5_07-jdk-6u16-windows.exe on xp

'javac' is not recognized as an internal or external command.
and
exception in thread "main" java.lang.NoClassDefFoundError:

all google results point to wrong PATH environment variable, but what's there is C:\Sun\SDK\bin, that's as it was when installed.
theres no javac.exe in there, theres a javac.exe in C:\Sun\SDK\jdk\bin, but directing the environment variable there didnt seem to help.


If you have javac.exe in C:\Sun\SDK\JDK\bin then you should add that to the PATH environment variable, and once there you would need to close and re-open a new command line.

Steve
layla peters
Greenhorn

Joined: Sep 26, 2009
Posts: 2
lol
so simple
much appreciated
Samaresh Gupte
Greenhorn

Joined: Oct 03, 2009
Posts: 20
Steve Luke wrote:
layla peters wrote:sorry if this has been asked before, i did a scan of the last few pages, if it was there i missed it. Obviously complete noob here...

installed java_ee_sdk-5_07-jdk-6u16-windows.exe on xp

'javac' is not recognized as an internal or external command.
and
exception in thread "main" java.lang.NoClassDefFoundError:

all google results point to wrong PATH environment variable, but what's there is C:\Sun\SDK\bin, that's as it was when installed.
theres no javac.exe in there, theres a javac.exe in C:\Sun\SDK\jdk\bin, but directing the environment variable there didnt seem to help.


If you have javac.exe in C:\Sun\SDK\JDK\bin then you should add that to the PATH environment variable, and once there you would need to close and re-open a new command line.


@Steve
The last line made me a bit curious.
If I make changes to the path and/or classpath, and I wish to continue to use the same command prompt, can I do so after running C:\autoexec.bat?
Will the changes in classpath and/or path reflect in the current command prompt?
Or are there any other means to do so?
I do not wish to type in all the commands again that I had already ran before. I wish to use the down or up arrow keys to get to the previous commands ran


Regards,
Samaresh Gupte
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Samaresh Gupte wrote:
I do not wish to type in all the commands again that I had already ran before. I wish to use the down or up arrow keys to get to the previous commands ran


the existing command promt cant recognize your lastest setting of environmental variable
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39044
    
  23
Please don't ask new questions on somebody else's thread, Samaresh Gupte. This is called hi=jacking, and is not regarded at all highly. I am closing this thread.

By the way: don't set up a system CLASSPATH.
 
GeeCON Prague 2014
 
subject: 'javac' is not recognized as an internal or external command