Results 1 to 20 of 20
- 03-19-2012, 02:00 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 6
- Rep Power
- 0
'javac' is not recongnised as an internal or external command - help!
Hi!
I'm new to Java. When I try to compile a program I get this message:
Before putting this question here, I searched for a solution and the majority of answers told me to put the path of Java JDK in the Environmental Variables - which I did.'javac' is not recognized as an internal or external command, operable program or batch file.
I really need this to work because of school and I have a work due on Sunday.%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\;
C:\Program Files\Intel\WiFi\bin\;
C:\Program Files\Common Files\Intel\WirelessCommon\;
C:\Program Files (x86)\QuickTime\QTSystem\;
C:\Program Files\TortoiseSVN\bin;
c:\MinGW\bin;
C:\Program Files\Java\jdk1.7.0_03\bin;
Thanks.
- 03-19-2012, 02:04 PM #2
Senior Member
- Join Date
- Jan 2011
- Location
- Belgrade, Serbia
- Posts
- 227
- Rep Power
- 3
Re: 'javac' is not recongnised as an internal or external command - help!
Try to navigate to that folder: C:\Program Files\Java\jdk1.7.0_03\bin; and then type javac to see if it works.
Sorry, do this in cmd prompt..Last edited by milovan; 03-19-2012 at 02:05 PM. Reason: clarification
- 03-19-2012, 02:08 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 6
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
It does.
- 03-19-2012, 02:11 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: 'javac' is not recongnised as an internal or external command - help!
The PATH usually doesn't have newlines in it like that.
Also ensure there's no extra spaces before the JDK path. That seems to cause lots of trouble.Please do not ask for code as refusal often offends.
- 03-19-2012, 02:14 PM #5
Member
- Join Date
- Mar 2012
- Posts
- 6
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
It doesn't have newlines. I just did it for better comprehension. There's just the one space between "Program" and "Files" and that cannot be avoided.
- 03-19-2012, 02:19 PM #6
Senior Member
- Join Date
- Jan 2011
- Location
- Belgrade, Serbia
- Posts
- 227
- Rep Power
- 3
Re: 'javac' is not recongnised as an internal or external command - help!
Well, no idea. Try to add it once more...
- 03-19-2012, 02:21 PM #7
Member
- Join Date
- Mar 2012
- Posts
- 6
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
I seem to have found a temporary solution. If I put set path=%path%;"C:\Program Files\Java\jdk1.7.0_03\bin" in the command line, it works. But when I close it and open another one, it goes back to not working.
Can someone help me find a permanent solution?
- 03-19-2012, 02:24 PM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: 'javac' is not recongnised as an internal or external command - help!
Can you post the actual PATH as it appears, and not edit it.
Please do not ask for code as refusal often offends.
- 03-19-2012, 02:26 PM #9
Member
- Join Date
- Mar 2012
- Posts
- 6
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
Sure. Here goes.
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;c:\MinGW\bin; C:\Program Files\Java\jdk1.7.0_03\bin;
Thanks.Last edited by Ricardo; 03-19-2012 at 02:28 PM.
- 03-19-2012, 02:30 PM #10
Member
- Join Date
- Apr 2010
- Location
- Warakapola, Sri Lanka
- Posts
- 15
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
This isn't the way that setting the class path for javac.
you have to edit the path environment variable and copy the path to the end of the line.
Eg:-
when you click on edit button after selecting path environment variable you should look something like this editable,
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\;
you should copy the path of the bin directory to end of this line. like below,
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\;C:\Program Files\Java\jdk1.7.0_03\bin
This is the way that I sat the class path.
- 03-19-2012, 02:36 PM #11
Re: 'javac' is not recongnised as an internal or external command - help!
I'd recommend posting your full path, without added new lines, with the code tags instead of quote tags. There are a couple things that look wrong with that path (extra spaces, weird characters, wrong case), and I don't know if they are actually problems or if they're just caused by incorrect copy-pasting.
Edit- Way too slow, nevermind!How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-19-2012, 02:54 PM #12
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
- 03-19-2012, 03:13 PM #13
Re: 'javac' is not recongnised as an internal or external command - help!
type in cmd
set path=%path%;C:\Program Files\Java\jdk1.7.0_03\bin
then restart cmd
then type "javac"
thx
dhilip
- 03-19-2012, 03:25 PM #14
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: 'javac' is not recongnised as an internal or external command - help!
That set will only apply to the currentl open cmd window.
When you close and reopen it is not "remembered".
As the OP has already said in post #7.Please do not ask for code as refusal often offends.
- 03-19-2012, 05:54 PM #15
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: 'javac' is not recongnised as an internal or external command - help!
When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 03-20-2012, 07:57 AM #16
Re: 'javac' is not recongnised as an internal or external command - help!
hi,
sorry yesterday, I had network problems, and I posted the last post 2 hours earlier.. and reloaded the page when net worked, so it got posted automatically, now im deleting that message.. and the space should be the mistake in the environmental variables
regards
dhilip
- 03-20-2012, 07:32 PM #17
Member
- Join Date
- Mar 2012
- Posts
- 6
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
Problem solved! You were right. It was the space before the "C:\".
Thank you so much!
- 03-21-2012, 09:52 AM #18
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: 'javac' is not recongnised as an internal or external command - help!
Did you add that to the PATH, or was it done by the installer?
I'm curious because we have had several of these recently for Windows 7.Please do not ask for code as refusal often offends.
- 04-10-2012, 05:54 AM #19
Member
- Join Date
- Apr 2012
- Posts
- 1
- Rep Power
- 0
Re: 'javac' is not recongnised as an internal or external command - help!
can u plz help me as i am new to java...i have installed java version 1.7.and by default it got installed in the path you mentioned above.now when i try to compile java program.it says javac not recognised as internal or ext command.now i have checked the path and i was unable to find java.exe or javac.exe.what may be the path these files..plz help me.and on cmd when i try to know java_version.then no error comes.a small screen comes and then disappears.it happens same when i type java.exe .....plz suggest me what to do
- 04-10-2012, 10:34 AM #20
Re: 'javac' is not recongnised as an internal or external command - help!
1. Use an uppercase letter at the start of each sentence and for the first person singular 'I'
2. Use proper words: "Can you please" not "can u plz" / "internal or external command" not "internal or ext command"
3. End a sentence with one period, followed by one or two spaces if not at the end of a paragraph.
Express yourself more clearly:
Are you talking about the PATH system variable or the file path where you expected to find the executables? If the former, why did you expect to find executable file names in a system variable that contains the names of folders to be searched for files? If the latter, you haven't installed Java successfully.now i have checked the path and i was unable to find java.exe or javac.exe.
The Windows "Run command" dialog isn't a command prompt window.on cmd when i try to know java_version.then no error comes.a small screen comes and then disappears.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
Similar Threads
-
'javac' is not recognized as an internal or external command...HELP!
By taymilll in forum New To JavaReplies: 25Last Post: 06-23-2012, 11:30 AM -
‘javac’ is not recognized as an internal or external command help
By bmw2085 in forum New To JavaReplies: 12Last Post: 01-28-2012, 05:24 PM -
ava (and javac) iis not recognized as an internal or external command.
By Java-Idiot in forum New To JavaReplies: 1Last Post: 10-16-2011, 11:15 PM -
javac not recognized as an internal or external command
By kotoko in forum New To JavaReplies: 28Last Post: 10-26-2010, 04:39 AM -
'javac' is not recognized as an internal or external command
By sam_1032002@btopenworld.c in forum New To JavaReplies: 3Last Post: 10-18-2008, 02:40 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks