First of all download jdk for windows and then install and configure the Java SE development environment at this underlying operating system.
Downloading and Installing J2SE Software on Windows Platform
To download J2SE for windows operating system visit http:/www.java.sun.com/j2se and download J2SE on your machine. In this tutorial we have used jdk-1_5_0_06-windows-i586.exe.The java 2Platform or (JDK) can be downloaded from the sun. Formerly Known as the java Development kit ,or JDK, Downloading java is really about downloading the java 2 platform that comes in three editions, J2ME, J2SE and J2EE, if you are learning java, then you should start by downloading J2EE.
Once you have downloaded the j2se on your system, you are ready to install. Then install jdk on your machine. To know about the installation process in detail click on the this link: http:/www.roseindia.net/java/beginners/installing_java.shtml
Setting Up the Environment for Java on Windows: This section describes settings for the windows environment so that the java compiler and runtime becomes available for compiling and running the java application. Setting up the environment is necessary as it provides connection between the Java runtime and the file system. It defines the location where the compiler and interpreter searches .class files for loading.
To set up the environment on windows, first go to the control panel, double click on "System Properties" then advance tab, add "c:\jdk1.5.0_06" to path variable and then click on the ok button. To save the setting, click on the "OK" button. This makes the java environment available for development. Now your development environment is ready for development. Open the DOS prompt and type javac on the console, it should show the following output:
Developing and Running a Simple Java program on Windows
Lets try to compile and run the simple java program on windows. Given below is the Simple Hello World java program
Save this program as HelloWorld.java (I have this program in the C drive) and then compile this program on the command prompt by using the following command:
after compiling the code use the following command to run the program which on successfully running shows the output given below:
Congratulations! your program is successfully run, now you can more towards the more bigger programs.
Liked it! Share this Tutorial