1. Before setting up your environnement

A. Download and install java JDK (the latest version)

On oracle website select and download the latest release of JAVA SE (download the JDK, not the JRE). Select the right version depending on the systeme you'll be running it on.

In the following section we will learn how to install jdk development environment on your windows machine (check this link for other OS).
Here are the step to install JDK on your windows machine:

  1. Open the downloaded file
    On the license agreement page read and accept the license and the click the next button .


  2. The custom setup screen appears as follows.


  3. Click on the change button to change the installation directory to "c:\jdk1.5.0_06" as shown in the following screen, OR leave the default intallation path as it is.

    and click on the "OK" button. After clicking on the "OK" button installation begins:


  4. In the next window installer asks for the installing the runtime as shown in the following screen:


  5. Click on next button install the J2SE runtime on your machine. Next screen shows the browser selection:

    Click on the "Next" button.

  6. Once the installation is finished it shows you the final screen indications the success. Now you have successfully installed J2SE on your machine. Installer shows the following final confirmation window as shown below :

    Click on the "Finish" button to exit from the installer.

  7. LAST STEP (the most important) :
    Configuring the installation on windows machine :
    In this Section we will add some settings to the windows environment so that the java compiler and runtime becomes available for compiling and running the java application.
    Go to the control panel and double click on "System Properties" and to the advance tab (Depending on your windows version it will differ).

    and add "c:\jdk1.5.0_06" (OR the default path if you left it as it was) to path variable:

    This will make the java environment available for development. Open the dos prompt (start >> run >> and type cmd then press enter) and type javac on the console, it should show the following output :
    C:\Documents and Settings\Administrator>java
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)

    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument


    C:\Documents and Settings\Administrator>

    Now your development environment is ready for development.

B. Download and install Eclipse (optional)

If you plan on developing using java from the command line, skip this step and go to the next step


To use Eclipse in your system, it is required to download its appropriate copy along with java runtime environment.

  1. Downloading Eclipse :

    Eclipse can be obtained from eclipse's home page. Download the latest release of eclipse ("Eclipse IDE for Java EE Developers").
  2. Installing Eclipse :

    Unzip the downloaded file into the directory of your choice (C:\eclipsewin32).This creates another folder named eclipse containing all the unzipped files and folders.
    This is the first installation step for Eclipse.
  3. Initializing Eclipse :
    Running eclipse requires following steps :
    1. Double Click the ?eclipse.exe? file in the eclipse folder.
    2. Now it will ask to specify a workspace to use (C:\Eclipse\workspace). Press OK to continue.



  4. If Eclipse has been opened first time with this workspace then a welcome screen is opened. Rolling over the icons provides you help facilities. Click on arrow like icon on the right side of the screen.


  5. Clicking on the arrow like icon opens a blank eclipse window.