Upload
vnagd12
View
229
Download
0
Embed Size (px)
Citation preview
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 1/8
JAVA Software - JDK 6
Installation
Java - Java Standard Edition (J2SE)
Written by Ramana (SCJP,SCWCD,SCDJWS)
Monday, 18 January 2010 20:38Article Index
JAVA Software - JDK 6 Installation
This article will show you how you can install Java (J2SE 1.6) with a step-by-step procedure.
Step 1: Minimum space requirement check.
Make sure you have at least minimum of 512 MB free space on your hard disk (not memory) in order to
If you want to check, how much free space you have on your system, you can double click o
your desktop. My computer window opens up (similar to the picture below). You can see the available fr
Step 2: Download Java Development Kit.
To download the software, Please click on this link http://java.sun.com/javase/downloads/index.jsp.
After going to the sun¶s website, click on the Download JDK button.
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 2/8
You will be presented with another screen as shown in the picture. Go ahead and click on Download but
You may be asked to register with sun¶s website. You can either register if you want or you can skip the
You will see a pop-up, like the one on the left. You can either try to install it from website immediately oyour convenience later.
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 3/8
Step 3: Installing the downloaded software
If you have clicked Run button, you will run the self-installing executable to unpack and install the JDK
an option to include the public Java Runtime Environment.
If you save the self-installing executable to your hard disk without running it from the download page at download page. Once the download has completed, check that you have downloaded the full, uncorrupte
Run the JDK installer
Note: You must have administrative permissions in order to install the JDK on Microsoft Windows.
The file jdk-6u1<version>-windows-i586-i.exe is the JDK installer. If you downl
click on the installer's icon. Then follow the instructions the installer provides. The installer may ask youyou can delete the download file to recover disk space.
Installed Directory Tree
The JDK has the directory structure shown below.
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 4/8
Step 4:Update the PATH variable (Optional)
You can run the JDK without setting the PATH variable, or you can optionally set it as a convenience.
Should I set the PATH variable?
Set the PATH variable if you want to be able to conveniently run the JDK executables (javac.exe, javatype the full path of the command. If you don't set the PATH variable, you need to specify the full path t
C:>"\Program Files\Java\jdk1.6.0_<version>\bin\javac" MyClass. java
It's useful to set the PATH permanently so it will persist after rebooting.
How do I set the PATH permanently?
There are two ways to set the path.
One way to set the PATH permanently is to add the full path of the jdk1.6.0_<version>\bin directory to
like C:\Program Files\Java\jdk1.6.0_<version>\bin.
Follow the below Instructions to set the PATH on Microsoft Windows:
Click Start > Control Panel on Windows XP or
Start > Settings > Control Panel on Windows 2000.
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 5/8
Double click on System icon. You will see a pop-up similar to the below picture.
Click Advanced > Environment Variables.
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 6/8
Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A
C:\Program Files\Java\jdk1.6.0_<version>\bin
E.g. C:\Program Files\Java\jdk1.6.0_18\bin
1. PATH environment variable is a series of directories separated by semi-colons (;) and is not case prompt, Windows looks for programs in the PATH directories in order, from left to right.
You should only have one bin directory for a JDK in the path at a time. Those following the first instanc
jdk1.6.0_<version>\bin.
If you are not sure where to add the path, add it to the right end of the PATH in the User Variables. If som between. The new path takes effect in each new command window you open after setting the PATH vari
Second way is a more of a systematic way to set path variable which will benefit yout in future situatioa pre-requisite. If you follow the below steps, the new java dependent installations will be able to locate
First, create a System Variable called JAVA_HOME which will point to java installation directory i.e. C
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 7/8
Tip. I suggest you to copy the value from address bar to avoid any typing mistakes.
Click on the New button in the System
Variables section on Environment
Variables window.
Enter JAVA_HOME as Variable name.
Paste the java installation location you
just copied into the variable value field.
Click OK.
8/6/2019 JAVA Software
http://slidepdf.com/reader/full/java-software 8/8
Now, set the path variable for java.
Locate Path System Variable and Click Edit. Add %JAVA_HOME%\bin; at the beginning of the Vari
In fact, the end result will be same as the first way but its useful for future installation tasks.
To explain what we just did, basically we are telling system to replace the JAVA_HOME variable with t
path value we just set. It will be the same as the value we set in the first way.
C:\Program Files\Java\jdk1.6.0_18\bin
With the JAVA_HOME, other java dependent software will be able to automatically locate the java insta
Step 5:Start using the JDK!
Your computer system should now be ready to use the JDK. In this step, you'll run some simple comman
Click Start -> run. Enter cmd and click ok. It will open a command window.
At the cursor, type java ±version and press enter key. If you see the below response for your command,
Remember, practice makes us perfect. Good Luck !