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]
# 1
You can set your PATH in PATH variable at : Control Panel->System->Advance->Environment Variables.
rfc_club at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...
# 2
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
bazookabush at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...
# 3
Set Path = "%path%;.; C:/> jdk path/bin ;set classpath = %classpath%;.; c:/jdk path/lib;
ShivaKatula at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...
# 4
This is what I'm about to do in C:\AUTOEXEC.BAT fileSET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BINSET CLASSPATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:JDK1.3.1\BINIs it right ? cos I do not intend to save it
akpome at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...
# 5

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 > top of Java-index,Administration Tools,Sun Connection...
# 6
You guys should forgive me if I sound dumb. Someone should give me the step by step configuration as I am a complete novice. I will really appreciate this.
akpome at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...
# 7

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

bazookabush at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...
# 8
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1\BINSET CLASSPATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:JDK1.3.1\BIN
wangwei_sd@msn.com at 2007-7-2 0:31:12 > top of Java-index,Administration Tools,Sun Connection...