Installing the JDK

This document was written by CS 290W TA Joshua Kay and was last modified .

Click on this link for a Detailed Install Procedure for the JDK.

What is the JDK?

JDK stands for Java Development Kit. It is the bare-bones kit provided for free by Sun. It is available for download at http://www.java.sun.com. (Click on JDK and follow the download instructions.) This allows compiling, debugging, and autodocumentation of documents, as well as the Appletviewer tool (to be explained later.) In order to use the JDK on a PC, you will write your java programs in a text editor, save them as plain text, and then compile and run them from an MS-DOS prompt, old-fashioned command-line style. The JDK will also work on other operating systems - but as this class is focused on a PC base, we will be approaching this topic only. If you wish to run JAVA on any other Operating System, and need help, you will need to post your questions to the newsgroup purdue.class.cs290w.

What version are we using for this course?

We are using the JDK 1.1.6 - which is the final bug-fix release of the JDK 1.1. We will not be using many of the features used by this release, but wanted to make it available for anyone ambitious enough to really 'get into JAVA'. So, here are a few points about this, the most up-to-date final release version of the JDK.

1) We will be teaching the 1.0 Event model for this course. This is because the browser available in PUCC labs is Netscape 4.05, which does not yet support the 1.1 Event model. The Event model will be explained in detail later, so don't worry if you don't know what we are talking about here. Basically - the Event model covers what happens when the user does something; e.g. - moves the mouse, clicks the mouse button, hits a key, etc.

2) Because we are using the 1.0 Event model, but running the JDK 1.1.6 - when you compile your program you will sometimes get a warning message that says you are using "deprecated methods". Deprecated methods are methods that were used in the JDK 1.0, but have been rewritten for the JDK 1.1.6, and will not be available in the future. This is an unfortunate tradeoff for this class - we have to use the old Event model because of our browser. Microsoft's Internet Explorer (version 4.x) supports the new model - but this is not available in the Purdue Labs, so we will not focus on it at all.

3) Anyone who wishes to learn the newer model, is more than welcome to post messages to the newsgroup about how to do things. But please note that we grade *ALL* of your work by how it looks and whether or not it works when we look at your Website using Netscape 4.05. So, you *MUST* use the 1.0 event model, or your programs won't work, and we won't be able to give you a good grade.

Installing the JDK on PUCC machines

When you log onto a PUCC machine, the JDK executable file is on your computer. Due to some unforeseen circumstances with servers and the way PUCC stores class material, this is an executable which will *INSTALL* the jdk onto the machine you are using at the time. Unfortunately, you will need to do this every time you log onto a PUCC Machine, if you want to use the JDK.

In order to reach this, go to the Start Menu/Standard Software/Compilers/Install jdk1.1.6. For some reason, it may ask you for a network password. Click Cancel if it does. It will ask you if you want to install The Java Development Kit 1.1.6. Click Yes (Continue), and follow all of the default settings. When you are done, you may get some error messages about windows, asking you to restart. *DO NOT* restart, as you would have to do this process all over again.

Now, if you go to Windows Explorer and look in your C Drive, you will now see a C:\jdk1.1.6 directory. This is where the JDK is located. You can run the Java compiler (javac) or the appletviewer from any folder.

Note here, that you can install the JDK in your career account, too. This might actually be a good idea, and would keep you from having to install the JDK every time you log in on a PUCC machine. The reason it is not installed on the Lab Server, is that we could not get Appletviewer to work due to running a PC program from a UNIX Server, so chances are that Appletviewer would not work for you this way. However – if you install it onto your career account, and can get Appletviewer to work from your career account, please let us know – as this is how we would like to have it set up in the future, and possibly even this semester.

You should be good to go now. Have a cup of JAVA and get at it!