Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about install & compile Java SDK 1.4 on win xp

Status
Not open for further replies.

Mike2020

Programmer
Mar 18, 2002
55
US
I just install the JAVA SDK 1.4 into my Window XP Home edition PC. When I try to compile the java file. I got this message.

>javac test.java

'JAVAC' is not recognized as an internal or external command, operable program or batch file.

Then I try to set the
set CLASSPATH=C:\j2sdk1.4
to the system envirnoment variable and autoexec.bat file.

But it still doesn't work. So I wonder that Java 1.4 doesn't support Window XP, or there are other problem.

Thank you so much.
 
The message you are getting is a PATH error not a CLASSPATH error. It means that Windows can't find an application called javac.exe on your list of places to look for these things(your PATH).

If you downloaded the windows version of the JDK1.4 from sun recently, it was probably bundled with Forte and has been installed in a different spot than the standard C:\j2sdk1.4. On my system is was placed here:

C:\J2SDK_Forte\jdk1.4.0\bin\javac

You should be able to get things figured out with the following tips.

1. locate the directory where javac.exe lives
e.g. C:\J2SDK_Forte\jdk1.4.0\bin

2. type SET in the command prompt to echo out your system variables such as PATH and CLASSPATH

3. check if that directory is contained in the string associated with the PATH variable
e.g.
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32Wbem;C:\ant\bin;C:\j2sdk1.4.0\bin

4. If it's not in there, go through the horrendous effort of using MS's terrible interface for system variables
Control Panel --> System --> Advanced Tab --> Environment Variables --> System Variables --> Edit

... or you could just double click that "Forte for Java CE" icon and start using Java right away. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top