Intalling Java

advertisement
How to install Java
CSC 2310
D M Rasanjalee
Steps
1.
2.
3.
4.
Download Java
Install Java
Update Path environmental variable
Verify Installation
1. Download Java
1.
Open your
web browser
2.
Type URL:
http://www.orac
le.com/technetw
ork/java/javase/
downloads/index
.html to go to
Oracle download
page
3.
Click on button “
JDK download ”
for Java SE
update 4.
This will lead you
JDK download
page
http://www.orac
le.com/technetw
ork/java/javase/
downloads/jdk7u4-downloads1591156.html
4. Accept oracle
license agreement
5. Find and click on
the correct jdk
download link
right for your
operating system
to download
6. Save the file to
disk
2. Install Java
1.
2.
1
4
Double click to run the download file
Just follow the prompt in Installer window
2
3
5
6
7
3.Set Path
•
After installing the software, the JDK directory will have the structure shown below.
•
The bin directory contains both the compiler and the launcher. The path environmental variable should be
updated to include path to bin in PATH variable. This is not mandatory, but highly recommended for convenience.
•
It is useful to set the PATH variable permanently so it will persist after rebooting.
•
To set the PATH variable permanently, add the full path of the jdk1.7.0\bin directory to the PATH variable. Typically,
this full path looks something like C:\Program Files\Java\jdk1.7.0\bin in Windows o/s.
•
Refer: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html to learn how to do this.
•
For example, in Windows 7:
REF: http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#Check
1.
4.
2.
3.
5.
Add the location of the bin folder of the JDK
installation for the PATH variable in System
Variables in Environmental variables.
The following is a typical value for the PATH
variable:
C:\WINDOWS\system32;C:\WINDOWS;C:\
Program Files\Java\jdk1.7.0\bin
Verify Installation
•
Go to command prompt
and type javac
•
It should display javac
usage with options if
installed correctly
Useful Links
• JDK installation for Microsoft Windows:
– http://docs.oracle.com/javase/7/docs/webnotes/i
nstall/windows/jdk-installation-windows.html
• JDK installation for Mac OS X:
– http://docs.oracle.com/javase/7/docs/webnotes/i
nstall/mac/mac-jdk.html
• JDK installation for Linux Platforms:
– http://docs.oracle.com/javase/7/docs/webnotes/i
nstall/linux/linux-jdk.html
Download