Download
JDK 5.0 from java.sun.com
It
will began to install by itself. Click on all "OK" buttons.
Now
you have JAVA compiler on your machine. When you try to compile
a java file , you need type the full path to javac.exe, e.g,
somthing like "C:\Program Files\Java\jdk1.5.0_04\bin\javac".
If you want to just type "javac file.java" to compile
JAVA file, you need setup your path enviorment variable and make "javac.exe" available
to every path.
Following is an example for setting
path variable in "Windows XP home edition"
Click
on "Start" button on lower left corner.
Click on "Control Panel"
You will see Control Panel Window. Then Click on "Performance
and Maintenance".

Then click on "System icon"

Now, you will see "System Properties" window. Choose the "Advance" tab.
On this tab, click on "Environment variables".

You will see of new window

Double click on the line starting with "Path". You will
see

Move cursor to the end of "Variable value:" and put ";" to
the end, then add your full path to JDK bin directory, like "C:\Program
Files\Java\jdk1.5.0_04\bin". Click "OK" buttons
to close all opened windows.
Test
javac, open one "Command Prompt" window, which
could be found under Start->"All programs"->"Accessories"
Type javac. press "enter"
You should be able to see:
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u |
Congratulations! You are set to go! |