Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

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

 
layla peters
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
layla peters
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Report post to moderator
lol
so simple
much appreciated
 
Samaresh Gupte
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Pie
Posts: 49405
62
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic