Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java W Java for Windows

Related Tutorials


 
 

Share on Google+Share on Google+

Java for Windows

Advertisement
First of all download jdk for windows and then install and configure the Java SE development environment at this underlying operating system.

Java for Windows

     


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

public class HelloWorld {
  public static void main(String[] args) {
  System.out.println("Hello World!");
  }
}

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:

C:\>javac HelloWorld.java

after compiling the code use the following command to run the program which on successfully running shows the output given below:

C:\>java HelloWorld
Hello World!

Congratulations! your program is successfully run, now you can more towards the more bigger programs.

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 18, 2009

Related Tutorials

Discuss: Java for Windows  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
suthan
June 20, 2012
java

need yava
DMCA.com