# Thread: javac not recognized as an internal or external command

1. Member
Join Date
Nov 2007
Posts
4
Rep Power
0

## javac not recognized as an internal or external command

I am unable to runthe javac command
I get a "javac not recognized as an internal or external command"
I searched and tried everything I found but nothing works.
What I have so far:
:confused: eclipse runs perfectly (but I really need to run javac for school purposes)

:confused: my system variables:
JAVA_HOME -> C:\Programas\Java\jdk1.6.0
CLASSPATH -> .;%JAVA_HOME%
Path -------> %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Programas\ATI Technologies\ATI Control Panel;C:\Programas\MATLAB7\bin\win32; %PATH%; %JAVA_HOME%\\bin

:confused: if I hava the file.java inside the directory where javac is it works perfectly

Pleeease help!

:confused: I'm trying to compile at D:\dei\workspace\HelloWorld\src

2. It looks like you have one extra \ in "&#37;JAVA_HOME%\\bin"

3. Member
Join Date
Nov 2007
Posts
4
Rep Power
0

## not working

tried and still not working. :(

btw - it was like that in the tutorial I followed (it was like that twice)

4. Member
Join Date
Jun 2007
Location
Colombo, Sri Lanka
Posts
32
Rep Power
0
type the following in the terminal (or command prompt) and see whether you get any output. If you get an error message then your environment variables haven't being setup properly.

Java Code:
java -version
Regards,
Hiranya

5. Member
Join Date
Nov 2007
Posts
4
Rep Power
0

## finally a command that works! :)

Java Code:
java -version
returns the version of java properly.

Does this mean anything about my system variables and\or what is my problem?

6. Hmm. Check if you have javac in the JDK's bin directory. It looks like you have a java.exe there but no javac.exe.

7. Member
Join Date
Nov 2007
Posts
4
Rep Power
0
I found the problem I had a space between ; and the start of the path in the system variable . . .

I now newbie error but thanks a lot for your help! :)

8. Member
Join Date
Jan 2010
Posts
1
Rep Power
0

## javac is not recognized as an internal or external commad

hello sir...
i've recently downloaded java programming software....when i tried to execute my frist program demo.java(my class name is demo)..its displaying a msg 'javac is not recognized as an internal or external commad'...i tried in many ways to set the path but i couldn't...
i've tried java -version in command prompt,it displayed "1.6.0_18" but
after installation it got placed n C:\program files\java\jre6.....,and 1.6.0_18 is no where shown,n even javac.exe is also not existing in bin...i tried many suggestions to set the path,class path,java_home bt they were of no use...plz plz plz help me...:confused:

9. Member
Join Date
Jul 2010
Posts
2
Rep Power
0

## problem with javac

hi all,

I installed jdk1.6.0_21 version and if I try to compile a simple Hello.java file, it throws an error saying "javac is not recognised as internal or external command". I have set my path as E:\Program files\java\jdk1.6.0_21\bin; Should it be set as both user & system variables??

Whats the mistake here?? plzzz help.

10. Member
Join Date
Mar 2009
Posts
51
Rep Power
0
you set the path that's a good job.now u need to set the class path by giving in the console like set classpath=./

11. Is the javac.exe file at the location in your PATH variable?
Open a command prompt window and enter: PATH to display the variables contents.
Does it show the path to the javac.exe file?

12. Originally Posted by a poster
plz plz plz
Originally Posted by another poster
plzzz
What are you? Bees or something? Please type proper English words here, we are not all insects.

kind regards,

Jos

13. Member
Join Date
Jul 2010
Posts
2
Rep Power
0
Hi Norm,

When I give PATH in the cmd prompt, it does not show the location of javac.exe.......

14. You need to change the PATH environment variable so it includes the path.
The PATH environment variable is set from the Settings | Control Panel | System panel.
Select the Advanced tab and
Click on the Environment variable's button.
At the bottom in System Variables, find the PATH entry and click the Edit button
Add the new path using ; to separate it
Its a stupid small text field so be careful.

15. Member
Join Date
Jul 2010
Posts
4
Rep Power
0
This has been happening to me for the last 2months and its really pissing me off, on my old PC profile it never happened and now its happening on almost every RSPS client i download including deathzscape and i really want to get rid of it. So when i extract the file off winrar onto the desktop and click run.bat this happens

apparently its do do with CLASSPATH and PATH on your environment variable and these are mine.

my CLASSPATH: * * * * *.;c:\Program Files\Java\jdk1.6.0_06\bin;

my PATH: * * * * * * * * * * C:\foo\bar\> set PATH=%PATH%;C:\j2sdk1.4.2_01\bin

These are ones i recently got off java forums and other places where people needed help and it still doesent work.

And these is how many servers do and don't work for me and there is alot more but have deleted most of them.

16. The OS can't find the java command on your computer.
There might be something wrong with your java installation. When the jre or jdk are installed the java.exe file is copied to a folder that is on the PATH. You do not need to set the path to the java.exe file yourself.

Do a system search for java.exe. On my system(WinXP), I find it in the following folders:
C:\WINDOWS\system32\
C:\Program Files\Java\jdk1.5.0_04\bin\

17. Member
Join Date
Jul 2010
Posts
4
Rep Power
0
im on vista

18. Member
Join Date
Jul 2010
Posts
4
Rep Power
0
can't find it anywhere, i'll try downloading it again and setting it to a file that i can find.

19. How are you able to compile a java program and create class files without having the java.exe file available as part of the JDK you installed to get the javac.exe file?

20. Member
Join Date
Jul 2010
Posts
4
Rep Power
0
no idea, im bad att his stuff :S

Page 1 of 2 12 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•