Installing the JDK on a Windows 95/98 or NT Platform


Initial installation

To install the JDK on a Windows 95/98 or NT platform for the first time, the following procedure can be used. The amount of permanent hard drive space required is 20 MB if the documentation is not installed, and an additional 9MB is required temporarily for the installation file.

Note: Each release of the JDK has a version number. Version number 1.2.2 is used here, but the actual version that is downloaded might be a later version. These instructions should still apply if the current version number is substituted for 1.2.2.

  1. Obtain a copy of the installation program for the JDK. This can be done in any of the following ways at Clemson:

    1. On the DCIT network, the installation program is file s:\groups\cpsc\jdk\jdk1_2_2-win.exe (or later version). This file can be copied to the c: drive and executed (by double-clicking on it), or it can be executed directly if your computer is attached to the network. There also is an installation instructions text file in the s:\groups\cpsc\jdk\ folder. You can follow these instructions for an initial installation and ignore the remainder of this page if you wish.

    2. Copy the jdk1_2_2-win.exe file to your computer using anonymous ftp to ftp.cs.clemson.edu. The jdk1_2_2-win.exe file is in directory pub/turner/jdk.

    3. It is not recommended (because of unreliable transfers for a file of this size), but you can also try to download the jdk1_2_2-win.exe file using your web browser.

    4. Download the installation program from Sun's download web site. Follow the instructions provided to Download JDK 1.2.2 software. Note that installation instructions are provided in a README page. You probably do not want to also download the HTML documentation, nor any of the other items at this time. (The documentation is available directly over the net, and in the CS Department at Clemson.)

  2. Double-click on the file icon for the installation file (jdk1_2_2-win.exe) to execute it and install the JDK. You should be able to accept all default options without change, but you need not install the old native interface, the Java Sources, or the Java 2 Runtime Environment. (It is highly unlikely that you will ever want these, although you might want to look at the source sometime.) You also can omit the demos if you want to minimize the space used by the JDK files.

    You can delete the download file after the installation is complete.

  3. The installation will install the JDK in directory c:\jdk1.2.2\ (or whatever the version number is). It is a good idea to change the name of this directory to c:\jdk\ to avoid changes to the PATH when later versions are installed.

  4. Update the PATH variable so that the system will include the c:\jdk\bin\ folder in those that are searched for programs to be executed. To do this, edit the C:\autoexec.bat file and add ;C:\JDK\BIN to the end of the PATH command, or use the alternative modification given in the next step. Note that if this step is not done correctly then when you type a command such as javac or java at the Dos prompt the program (javac or java) will not be found and you will get a "Bad file or command name" message.

    An example of a revised PATH command in the autoexec.bat file is

     PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\JDK\BIN\
        
    However, your PATH command may differ somewhat because of your local configuration or software that you have installed.

  5. An easier alternative to editing an existing PATH command (which may not always be readily accessible on many systems) is to add the command
         SET PATH=%PATH%;C:\JDK\BIN\
             
    at the end of the autoexec.bat file, instead of modifying the PATH command as shown in the previous step above.

  6. If you wish to see the complete instructions, they are on the Sun Installation Instructions web page at the Sun documentation/download web site. However, the abbreviated version given here should be adequate.

  7. To test your installation, open a Dos prompt window and execute the command path. The current (old) path will be displayed. Then shutdown and restart your windows system and execute the path command again. The path that is now displayed should be the old path with the additional jdk\bin\ path at the end.

    For the final (and most important) test, type the command javac. You should get a response of the form

    use: javac [-g] ...
    indicating that this is an invalid javac command (no file to compile). If instead you get a message "Bad command or file name", then the installation is not correct.

  8. You should now be able to compile and execute standard Java programs using the commands javac and java (and other JDK commands as well).

Updating your version of the JDK

Unless the installation process for a new version of the JDK is significantly different than the above process that you used for the initial installation, you can install the new version by

  1. copying the jdkxx.exe installation file for the new version to your c: drive (if the installation file is not directly accessible);

  2. double-clicking on the installation file to execute it; and

  3. changing the c:\jdkx.y\ directory that is created by the installation to c:\jdk\. (You will have to delete or rename the old c:\jdk\ directory first.) You can then delete the installation file (if you copied it to your c: drive).


Last Modified: 23 August 1999