Checking if JAVA is already installed in your system

Follow this step to check if Java software development kit (JDK) is already installed in your system. To determine if JAVA SDK is already installed in your system, run the following command from command prompt.

java –version

If JAVA platform is already installed, it will display the version of the JAVA SDK. Below screen shows JAVA version 1.6 running on a windows system. If command executes successfully and shows JAVA version 1.6, you can skip the next step.otherwise download and install the Java SDK as explained in next step.

Install JAVA SDK

First thing you need to install is Java software development kit (Java SDK) . Download the Java development kit 6 (JDK 6) from Sun Java SE Download site.

Set up the JAVA_HOME environment variable

Once the JAVA SDK is installed follow this step to set the JAVA_HOME environment variable. If JAVA_HOME variable is already set, you can skip this step.

Right click on My Computer icon on your desktop it will open a popup menu, click on properties, it will open the system properties window, then click on advanced tab.

Click on environment variables button, it will open the environment variables window as shown in figure below. Initially there will be no JAVA_HOME environment variable set as shown in figure.

Click on new button to add new system variable JAVA_HOME.

In the variable name filed, enter JAVA_HOME. Specify the path to root directory of JAVA installation in variable value field and click OK button. Now JAVA_HOME will appear under user variables.

Next you need to add bin directory under the root directory of JAVA installation in PATH environment variable.Select the PATH variable from System variables and click on Edit button.

Add: ;%JAVA_HOME%\bin; at the end of variable value field and click OK button.

Now verify that everything is correct by following the step: Checking if JAVA is already installed in your system. It should show the version of the installed JAVA SDK.

Installing Tomcat

Tomcat is an opensource web container. Download tomcat 6 from here. Download the apache-tomcat-6.0.32.tar.gz and extract it to the directory of your choice.

Starting and shutting down Tomcat

To start the tomcat server, open the command prompt, change the directory to TOMCAT HOME/bin and run the startup.bat file. It will start the server.

startup

To shut down the tomcat server, run the shutdown.bat file. It will stop the server.

shutdown

Verifying Tomcat installation

To verify that tomcat is installed properly, start the server as explained above, open the web browser and access the following URL.

http://localhost:8080/index.jsp

You should see the default Tomcat welcome page as shown here.

env-window.png (19.1 KB) Nikos Simou, 06/03/2011 08:11 PM

Java_home.png (36.5 KB) Nikos Simou, 06/03/2011 08:11 PM

java_version.jpg (13.3 KB) Nikos Simou, 06/03/2011 08:11 PM

new_var.png (8.32 KB) Nikos Simou, 06/03/2011 08:11 PM

path_var.png (7.16 KB) Nikos Simou, 06/03/2011 08:11 PM

winwel.PNG (53.9 KB) Nikos Simou, 06/03/2011 08:32 PM