Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

6
Installing JDK Vijayan Sugumaran Department of DIS Oakland University

Transcript of Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

Page 1: Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

Installing JDK

Vijayan Sugumaran

Department of DIS

Oakland University

Page 2: Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

Downloading JDK The Java SE Development Kit (JDK) installer can be

downloaded from the following url: http://java.sun.com/javase/downloads/index.jsp

Click on the Download button corresponding to JDK 7. On that page there are other options if you want the netBeans IDE or the Enterprise Edition, etc.

On the next page click on the license agreement radio button

Click on the link that says:

jdk-7-windows-i586.exe (for 32 bit operating system)

jdk-7-windows-x64.exe (for 64 bit operating system)

Run the installer file to start the installation of JDK

Accept all the default settings. It will create a new directory called jdk1.7.0 where you specified and there will be a subdirectory called “bin” which contains all the jdk tools (javac, java, etc.). There will also be another subdirectory called “lib” which is where the .jar files are stored

Page 3: Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

Setting Environment Variables In order to access the java binary files

from any directory, we should set the PATH environment variable

To access .class files from other locations, we need to set the CLASSPATH variable.

The CLASSPATH variable can also indicate where to look for .jar files

Page 4: Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

Setting Path and Classpath Right mouse click on “My Computer” and select the

“Properties” option The system properties panel will pop up. Click on the

“Advanced” tab. In Windows 7, click on the “Advanced system settings” link on the left which will take you to the “Advanced” tab.

Click on the “Environment Variables” button If the Path and Classpath variables are already

defined, then you can add values at the end by highlighting itand clicking on the “Edit” button.

The directories are separated by semicolon If the variables don’t exist, then you can create them by

clicking on the “New” button, and enter the values for those variables (see next slide)

The first value for the classpath variable should be “.;” that indicates current directory

Page 5: Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

Environment Variables in Windows 7

Page 6: Installing JDK Vijayan Sugumaran Department of DIS Oakland University.

System Properties Panel (XP)