Hello,
I've been struggling with this comandline for quite a while.. I set up my CLASSPATH perfectly. When I type "java -version" it works perfectly, when I type "java myClass" the program runs beautifuly. but when I try compliting .java files, it says something bout "javac" does not exist or something..
But why? If all the other stuff working, why doesn't javac work?
Any ideas?
javac command in cmd prompt not working
Page 1 of 17 Replies - 3080 Views - Last Post: 12 October 2010 - 07:35 AM
Replies To: javac command in cmd prompt not working
#2
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 02:01 AM
have you set the path to the javac.exe in your "path" environment variable?
#3
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 02:12 AM
uhmmm
Do you have to add that seperately also? I just add the path to the bin directory in my CLASSPATH. So in my CLASSPATH I'll just put a ";" in there and add the path to the javac.exe? Where would the javac.exe be located?
Thank you so much!
Do you have to add that seperately also? I just add the path to the bin directory in my CLASSPATH. So in my CLASSPATH I'll just put a ";" in there and add the path to the javac.exe? Where would the javac.exe be located?
Thank you so much!
#4
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 02:23 AM
By default, Java gets installed in the Program files folder in your System volume.
Usually, javac.exe is located in C:\Program Files\Java\jdk1.6.0_20\bin where 1.6.0_20 is the version.
Bottom line : Locate the installation, copy the address of 'bin' folder. Add ;<Address> to the path environment variable.
Usually, javac.exe is located in C:\Program Files\Java\jdk1.6.0_20\bin where 1.6.0_20 is the version.
Bottom line : Locate the installation, copy the address of 'bin' folder. Add ;<Address> to the path environment variable.
This post has been edited by Nikhil_07n: 12 October 2010 - 02:23 AM
#5
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 02:27 AM
Dean_Grobler, on 12 October 2010 - 01:12 AM, said:
uhmmm
Do you have to add that seperately also? I just add the path to the bin directory in my CLASSPATH. So in my CLASSPATH I'll just put a ";" in there and add the path to the javac.exe? Where would the javac.exe be located?
Thank you so much!
Do you have to add that seperately also? I just add the path to the bin directory in my CLASSPATH. So in my CLASSPATH I'll just put a ";" in there and add the path to the javac.exe? Where would the javac.exe be located?
Thank you so much!
On my system it is installed here:
C:\Program Files (x86)\Java\jdk1.6.0_21\bin
Make sure you jave sdk (AKA jdk) installed as apposed to just the runtime environment. What operating system are you using?
#6
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 02:34 AM
That's exactly what I did man, but javac not working. I have added the path to the bin directory in my enviroment variables...
I'm using Windows 7 hey...
I'm using Windows 7 hey...
#7
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 06:11 AM
Check if the file javac.exe is in the bin folder or not. If not, reinstall jdk.
This post has been edited by Nikhil_07n: 12 October 2010 - 06:12 AM
#8
Re: javac command in cmd prompt not working
Posted 12 October 2010 - 07:35 AM
Are you sure that you have the Jdk instead of the JRE?
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote






|