Results 1 to 4 of 4
- 08-06-2011, 06:15 AM #1
Member
- Join Date
- Aug 2011
- Posts
- 2
- Rep Power
- 0
Yet another question on Javac not recognized - Env Variables already set
Ok, so I have looked at so many posts I am afraid I am going to get my computer confused. Maybe some other eyes will help.
Running XP on 64 BIT HP Elitebook.
1. Downloaded JDK 1.6.0_03
2. Located my installation in C:\Program Files\Java\jdk1.6.0_03\bin
3. Both java.exe and javac.exe exist at the above path
4. Went to Environmental Variables (here is where the various posts start to differ)
A. In System Variables, PATH already existed, but, was "Path". Changed to "PATH" and added jdk path. C:\Program Files\Nice Systems\NICE Player Codec Pack\;C:\Program Files\FileNET\Shared\;C:\Program Files\FileNET\;C:\Program Files\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\IBM\SQLLIB\FUNCTION;C:\Program Files\IBM\SQLLIB\BIN;C:\Program Files\Fidelity\Security Configuration;C:\Program Files\Oracle\jre\1.1.8\bin\;C:\Program Files\Oracle\jre\1.3.1\bin\;C:\WINDOWS\system32;C: \WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Utimaco\SafeGuard Easy\;C:\Program Files\NetManage\Windows;C:\Sybase\DLL;C:\Sybase\BI N;C:\oracle\ora92\bin\;C:\Program Files\Fidelity\Autoruns;C:\Program Files\FNSW\CLIENT\BIN\;C:\Program Files\FNSW\CLIENT\SHOBJ\;C:\Program Files\FNSW\CLIENT\BIN;C:\Program Files\FNSW\CLIENT\SHOBJ;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.6.0_03\bin
B. In System Variables CLASSPATH did not exist. Added it. C:\Program Files\Java\jre1.6.0.23\lib\ext\QTJava.zip;C:\Progr am Files\Java\jdk1.6.0_03\bin
C. In User Variables PATH already existed as "PATH". Added the JDK path. C:\FASM;C:\ORANT\BIN;C:\PROGRA~1\FESXTRAC\BIN;C:\P ROGRAM FILES\FASM;C:\Program Files\Java\jdk1.6.0_03\bin
D. In User Variables CLASSPATH did not exist. Added it. C:\Program Files\Java\jdk1.6.0_03\bin
5. At CMD prompt ran C:\>C:\autoexec.bat. Goes back to the prompt. Any message supposed to be here?
6. At CMD prompt ran C:\>java -version. Only information for JRE displays
7. Run C:>javac, got the 'javac is not recognized as an internal or external command..." message.
Any ideas?Last edited by JavaLady; 08-06-2011 at 06:22 AM. Reason: Left of operating system info and added 2nd screenshot
- 08-06-2011, 06:46 AM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 17
Unless you want a CLASSPATH variable to be set for some reason delete it.
The PATH variable is useful as mentioned as #1 in the "Common Problems" page of Oracle's Tutorial. The JDK installations they refer to there are here. Note point 4 "Update the PATH variable (Optional)". The instructions given there are good (and they don't involve running autoexec.bat).
(Note the comment made there about how the PATH is read from the left so that duplicate entries will result in only the leftmost one being effective. They make this point with respect to the jdk bin directory but it is valid also for the jre bin directories which you have included twice. As it stands you are always going to get the leftmost - oldest - java.exe, which probably not the one you want.)
You can use the
Java Code:C:\>path
Java Code:C:\>dir <path to jdk\bin>
If you continue to get "'javac' is not recognised...", copy and post those two commands and their associated output. (As text, please.)Last edited by pbrockway2; 08-06-2011 at 06:50 AM.
- 08-07-2011, 03:17 AM #3
Member
- Join Date
- Aug 2011
- Posts
- 2
- Rep Power
- 0
I have it figured out.
I did remove the CLASSPATH, not sure if that is what the fix was though.
I went back to CMD and tried "path" but the path did not display. It was in the Environmental Variable windows though.
What was needed, on my machine at least, was a restart. Running autoexec.bat gave no results.
So now, when I run "path" at CMD prompt, the path actually does show up.
Thanks for taking the time to read and assist.
- 08-07-2011, 03:31 AM #4
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,716
- Rep Power
- 17
Similar Threads
-
'javac' is not recognized as an internal command
By Infected_ in forum New To JavaReplies: 3Last Post: 10-18-2010, 04:04 AM -
javac is not recognized command...
By javastudent87 in forum New To JavaReplies: 6Last Post: 07-30-2010, 06:50 AM -
Javac not recognized
By OscarLiu in forum New To JavaReplies: 8Last Post: 06-29-2010, 04:10 PM -
Javac is not recognized?
By Java idiot in forum New To JavaReplies: 4Last Post: 08-03-2009, 07:54 PM -
javac command not recognized
By sunshine39 in forum New To JavaReplies: 7Last Post: 03-04-2009, 04:54 AM
Bookmarks