Java Setup
Instructions for checking Java version and Java installation:
For this class, you should have either Java version 1.4.1 or 1.4.2. You can check which version of Java
is your default version by doing the following steps:
- Open up a command prompt. There are two ways to do this:
- Start menu-->Programs-->Accessories-->Command Prompt
- Start menu-->Run
In the Open textbox, type cmd and hit the OK button.
- In the command window, at the prompt, type: java -version
For the freshman laptops, you should see something like:
java version "1.4.1_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_04-b01)
Java HotSpot(TM) Client VM (build 1.4.1_04-b01, mixed mode)
The first line should indicate a version that starts with either 1.4.1 or 1.4.2.
- If you do not have a version of Java that is recent enough, you may ask IT to help you. Or, you
can download and install it yourself. The following instructions explain how to download and
install Java 1.4.2.
- Goto the Java home page
- On the right there is a box titled Popular Downloads. There are many versions of Java,
all with very similar initials. What we want is the Standard Edition of Java. This
is labelled J2SE. Other versions of Java include the Enterprise Edition which
is J2EE and the Micro Edition which is J2ME. Java is also distributed
in two packages. The Java Runtime Environment, JRE, is what you would
install if you only wanted to be able to run Java programs. In order to be able to create (compile
and package) Java programs, we need the Software Development Kit, SDK.
So, what we are looking for is the most recent J2SE SDK, which is currently the J2SE 1.4.2 SDK.
Click on the link for this.
- Scroll down the page till you see the header Download J2SE v 1.4.2_01. You may choose
between the Windows Installation, a small download and the installer connects to Sun to
download the rest of the Java files during the Java installation, and the
Windows Offline Installation, larger download which downloads all the files necessary to
install Java so you can run the installer without being connected to the Internet. Be sure to
pick the SDK, as illustrated in the picture below.
- The license agreement is shown. Read it (if you wish) and scroll to the bottom of the page
and hit the ACCEPT button.
- A page is displayed with a link to the installer file. Click on the link and the File Download
dialog will appear and ask you where you want to save it. Remember where you save it.
- Double-click on the newly downloaded installer file and follow the instructions.
- Verify that your Java version is now 1.4.2.
For this class, you should have either Java version 1.4.1 or 1.4.2. You can check which version of Java
is your default version by doing the following steps:
At a prompt, type: java -version
For the freshman laptops, you should see something like:
java version "1.4.1_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_04-b01)
Java HotSpot(TM) Client VM (build 1.4.1_04-b01, mixed mode)
The first line should indicate a version that starts with either 1.4.1 or 1.4.2.
If instead, you get bash: java: command not found
then java has not been setup on your path (this is the case with the
freshman laptops). Some version of java should be installed in /usr/java.
The directory name will indicate the version of java.
Add the java bin directory to your path
and try again. The recommended way of doing this is to create a
symbolic link called /usr/local/bin/java which refers to
the java bin directory and add the symbolic link to your path.
This way, upgrading to a new version of java just involves updating
the symbolic link. If you have an older version of java, get a newer
rpm and install it.