Java on Windows XP
Hi All,
I'm new to Java. I set up JDK on a windowws xp machine . I did sysedit on the machine and edited the autoexec.bat file like this 'SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BIN' yet I could not get my machine to compile.
What have I missed out? Pls somebody help me!
[318 byte] By [
akpome] at [2007-9-30 7:34:12]

Hi,You will have to be more specific as to what you mean by "I could not get my machine to compile". Please describe the task you are attempting in details.Regards,bazooka
Does XP run in DOS mode ?
autoexec.bat does.
delete autoexec.bat and config.sys. THe last time a windows machine needed this was in win95!
Set environment variables properly.
ControlPanel-->>System-->>Advanced-->>
then change variables as needed.
Also winXP no need to reboot after change, but you do need to close and open your program session.
wew64 at 2007-7-2 0:31:12 >

Hi,
To compile a JAVA class you have two basic requirements:
1) The compiler
2) The compiler needs a reference of the classes being used in the classpath
There are many ways you can go about having a JAVA complier compile your classes:
I will list a very simple way:
create a setEnv.bat file in a particular folder on your drive. Edit the setEnv.bat to add the lines between the --:
-
SET JAVA_HOME=<replace this whole text along with the angle brackets with the folder name where you have installed JDK>
SET PATH=%PATH%;%JAVA_HOME%\bin
SET CLASSPATH=%CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\tools.jar
--
Save the setEnv.bat
Start a command prompt
change directory to the folder where you have saved the setEnv.bat file
execute setEnv
Compile your class using the javac compiler