java development kit installation guide sun microsystems

24
Java Development Java Development Kit Kit Installation Guide Sun Microsystems

Upload: amelia-benford

Post on 31-Mar-2015

290 views

Category:

Documents


5 download

TRANSCRIPT

Java Development KitJava Development KitInstallation Guide

Sun Microsystems

Downloading

Java Development Kit

If you do not have JDK setup, follow these instructions to download– Go to the link http://java.sun.com/javase/downloads/index.jsp

– Under the Section “Java SE Development Kit (JDK) ”

– Click on Download Button

– (on the next page) Select Platform (like Windows)

– Check the License Agreement checkbox

– Click on Continue button

– (normally download begins after this stage, but sometimes it ask for a few other options)

– In the middle of the (visible) page there would be a link under section

Java SE Development Kit xUyy (i.e 6U16)

– Right click on the Link save target as (define path where you want to save your download)

Java Development Kit (JDK)Downloading JDK Installer

Java Development Kit (JDK)Downloading JDK Installer

Java Development Kit (JDK)Downloading JDK Installer

Java Development Kit (JDK)Downloading JDK Installer

Java Development Kit (JDK)Downloading JDK Installer

Java Development Kit (JDK)Downloading JDK Installer

Installing

Java Development Kit

Double Click the JDK setup,

which you have downloaded

Java Development Kit (JDK)JDK Installation

Click on Accept button on License Agreement dialogue box

Java Development Kit (JDK)JDK Installation

Keep the Default Setting (recommended)

Keep the ‘Install to’ path as default (recommended)

Click on ‘Next’ button

Java Development Kit (JDK)JDK Installation

The Installation would begin nowPlease wait for a while, until the setup would finish the Installation

Java Development Kit (JDK)JDK Installation

Once the Installation is Finished

Click on ‘Finish’ button to complete the setup

Java Development Kit (JDK)JDK Installation

Java Development Kit - jdk 1.6_x

Now Install the downloaded JDK as any other software

Say You have installed it on normal path C:\Program Files\Java\jdk1.6.0_15\

The Important thing is to setup the Environmental Variables for JDK.

Follow the coming steps to Set your Environmental Variables correctly…

Java Development Kit (JDK)JDK Installation

Setting

Environmental Variables for

Java Development Kit

Right Click on you’re My Computer Icon

and Click on Properties option

Java Development Kit (JDK)Setting JDK Environmental Variables

System Properties Dialogue Box would be displayed:

Java Development Kit (JDK)Setting JDK Environmental Variables

Select Advanced Tab

Click on Environmental Variable button

Java Development Kit (JDK)Setting JDK Environmental Variables

A separate “Environmental Variables” Dialogue box would appear Which already contains two types of Values,, i.e. User Variables for user_xyz, and System Variables (or Global variables)

We would set our Desired Variables in User Variable Section

To set a User level Environmental VariableClick on New button, below the User Variable Section

Java Development Kit (JDK)Setting JDK Environmental Variables

Environmental Variable JAVA_HOME

When You click on New button, a dialogue box would appear which would be having two fields ‘Variable name’ and ‘Variable value’

In ‘Variable name’ field, put the value ‘JAVA_HOME’ (case sensitive)

and in ‘Variable value’ field the value would be full path of Jdk Installation (where ever you have installed it) for example, In my case, it would beC:\Program Files\Java\jdk1.6.0_15\

Then click on OK button

Java Development Kit (JDK)Setting JDK Environmental Variables

Environmental Variable Path

In ‘Variable name’ field, put the value ‘Path’

and in ‘Variable value’ field value would be %JAVA_HOME%\bin

Remember this %JAVA_HOME% is the reference to the environmental variable we have set previously,, and here the value would be %JAVA_HOME% followed by \bin(don’t skip or ignore the backslash ‘\’)

Then click on OK button

Java Development Kit (JDK)Setting JDK Environmental Variables

Environmental Variable classpath

In ‘Variable name’ field, put the value ‘classpath’

The value field would actually contain three values separated by semicolon ‘;’ and they are:

. (a dot), JDK library path and JRE library path

Thus the value would be like.;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib

(it’s like dot ‘.’ followed by semicolon ‘;’ then %JAVA_HOME% followed by \lib followed by another semicolor ‘;’ then %JAVA_HOME% followed by \jre\lib (note backslashes carefully)

Then click on OK button

Java Development Kit (JDK)Setting JDK Environmental Variables

Prepared by:

Virtual University Open Source Software Community(VOSS Com.) [email protected]

VIRTUAL UNIVERSITY OF PAKISTAN

Java Development KitJava Development KitDownloading and Installation Guide