Java Development Kit 1.1.8_010 Installation Notes

Installation Notes

Java Development Kit (JDK) 1.1.8

Microsoft Windows 95 / 98 / 2000 / NT 4.0 (Intel Platform)


Microsoft Windows Installation Instructions

The installation and configuration process can be broken down into the  following steps:

  1. Run the JDK software installer, if necessary
  2. Update PATH and CLASSPATH variables
  3. Running the JDK software tools
  4. Uninstalling the JDK software
  5. Troubleshooting the Installation

1. Run the JDK software installer, if necessary

Check the file size - If you download the JDK software file instead of running the installer from your browser, check to see that the complete file was downloaded. Before you download a file, notice that its byte size is provided on the download page. Once the download has completed, check that you have downloaded the full, uncorrupted software file.

To run the JDK software installer, double-click on the icon for this file. Follow the instructions the installer provides.

When done with the installation, you can delete the downloaded bundle to recover disk space.

Unbundle the JDK software bundle and the JDK documentation bundle in the same directory. (The docs are available for download from step 2 of the JDK software download page.) Unbundling them in the same directory ensures that HTML links between the bundles will work properly. You can download and install the software bundle and documentation bundle in either order.

Installed Directory Tree
The JDK software and documentation directories will have the following structure. The docs directory and its contents will not be installed until you download and unbundle the JDK software documentation.

                        jdk1.1.8

   _________________________|________________
  |    |    |     |  |   |   |     |  |  |   |
README |    |     | bin lib  |   demo | docs |
    CHANGES |     |  |   | include | src |   |
        COPYRIGHT |          |     |  |      |
              LICENSE                   index.html
    

Included in the unbundled files is a file lib/classes.zip. DO NOT UNZIP THE CLASSES.ZIP FILE. This file contains all of the core class binaries, and must remain in its zipped form for the JDK software to use it. 

2. Update PATH and CLASSPATH variables 

It is possible for you to run the JDK software without modifying any system environment variables (such as PATH or CLASSPATH). However, you should test that CLASSPATH is not set, and most developers set PATH as a convenience.

Microsoft Windows NT - Make the following environment variable changes in the Control Panel. Start the Control Panel, select System, then click the Environment tab.

As a general rule, both PATH and CLASSPATH are defined as User Variables, although a system administrator may wish to define System Variables in some circumstances.

Microsoft Windows 98 and 95 - Make the environment variable changes to autoexec.bat.

  1. PATH - Set the PATH variable if you want to be able to run the executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory. If you don't set the path variable, you need to specify the path to the executable when running it. The path variable is merely a convenience to the developer and not necessary to set.
    1. To find out the current value of your PATH, at the DOS prompt type:
            C:>
      
                          path
                        
    2. To change the PATH permanently, open the AUTOEXEC.BAT file and make the change to the PATH statement. To edit the AUTOEXEC.BAT file in Microsoft Windows 95:
      1. Start a text editor by choosing "Start", "Programs", "Accessories", and choosing WordPad or NotePad.
      2. Choose Open from the File menu and type "c:\autoexec.bat" for the filename This will open the file for editing.
      3. Look for the PATH statement. Notice that the PATH statement is a series of directories separated by semi-colons (;). Microsoft Windows looks for programs in the PATH directories in order, from left to right. Look for other JDK software versions in the PATH. There should only be one path to a classes.zip file. When in doubt, put the java technology directory at the end of the path statement. For example, in the following PATH statement, we have added the java directory at the end:
      4. PATH C:\WINDOWS;
        
             C:\WINDOWS\COMMAND;
             C:\;C:\DOS
                               ;      C:\JDK1.1.8\BIN
                              
    3. To make the path take effect, execute the following:
          C:>
      
                           autoexec.bat
                        
  2. CLASSPATH Environment Variable - If you follow the default installation, you do not need to set CLASSPATH, because the compiler and other tools automatically find the Java platform classes. (This has actually been true in all versions of JDK 1.1, but was undocumented.) If your CLASSPATH is not set, you can skip this step.
  3. TESTING AND UNSETTING CLASSPATH

    If CLASSPATH is set and you want to unset it, you typically need to change the current value (at the command line) and the startup value (in a startup file or script). For example, to see if it is currently set, type:

           C:>
    
                         set
                      
    This lists all of the environment variables. CLASSPATH will not appear if it is not set. If it is set, you can unset the current value by setting it to no value:
           C:>
    
                         set CLASSPATH=
                      
    Also open your startup file (autoexec.bat) or script and remove the path to the JDK classes from the CLASSPATH environment variable, if you want the change to be permanent.

    WHAT CLASSPATH DOES

    The CLASSPATH tells the Java Virtual Machine * and other Java technology-enabled applications (which are located in the "jdk1.1.8\bin" directory) where to find the class libraries, such as classes.zip file (which is in the lib directory). By default, the java tools temporarily append the following to whatever CLASSPATH you have explicitly set in your startup file:

    
    
                    .;[bin]\..\classes;[bin]\..\lib\classes.zip
                      
    where [bin] is substituted by the absolute path to the jdk1.1.8\bin directory. Therefore, if you keep the bin and lib directories at the same directory level (that is, if they have a common parent directory), the Java technology executables will find the classes. You need to set the CLASSPATH only if you move classes.zip or want to load a different library (such as one you develop).

    3. Running the JDK software tools

    Your computer system should now be configured and ready to use the Java Development Kit. You start a tool by typing its name into the DOS window with a filename as an argument. None of the Java tools are Microsoft Windows programs with GUI interfaces -- they are all run from the DOS command line. You cannot run any JDK software tool by double-clicking on its icon.

    You can specify the path to a tool either by typing the path in front of the tool each time, or by adding the path to the system as in the previous step.

    1. Run the compiler on a source file.

      For example, if the JDK software is installed at C:\jdk1.1.8, to compile the source file myfile.java, go to a DOS shell and execute this:

          C:>
      
                            C:\jdk1.1.8\bin\javac myfile.java
                          
      or, if you have already aped C:\jdk1.1.8\bin to your path:
          C:>
      
                            javac myfile.java
                          

      Refer to the Troubleshooting section below if you have problems running the JDK software.

    2. Run an applet in AppletViewer.

      The AppletViewer is a application for running and viewing applets in a window. You can start the AppletViewer by executing the following, assuming you have already set your path (as described above):

      1. Use cd to change to a directory containing an html file that embeds an applet. JDK1.1.8 contains the TicTacToe applet in the demo directory:
        C:\>
        
                                  cd jdk1.1.8\demo\tictactoe
                                
      2. Run the AppletViewer passing in the html file:
        C:\JDK118\DEMO\TICTACTOE>
        
                 appletviewer example1.html
                      

    Documentation for all the JDK software tools can be found in your installed JDK documentation.

    4. Uninstalling the JDK software

    If you should ever want to uninstall the JDK software, go to the Start menu and select Settings, then select Control Panel. In the Control Panel, open the Add/Remove Programs utility. You will be presented with a list of software that you can uninstall. Simply choose the JDK software from the list and click the "Add/Remove..." button.

Troubleshooting the Installation

  1. If you see the following error message
  2. net.socketException: errno = 10047 -or- Unsupported version of Microsoft Windows Socket API check which TCP/IP drivers you have installed. The AppletViewer supports only the Microsoft TCP/IP drivers included with Microsoft Windows 95. If you are using third-party drivers (e.g., Trumpet Winsock), you'll need to change over to the native Microsoft TCP/IP drivers if you want to load applets over the network.
  3. If the AppletViewer does not load applets
  4. then you might try the following:
    1. set HOMEDRIVE=c:
    2. set HOMEPATH=\
      and restart the AppletViewer (in the same DOS box)
    3. set HOME=c:\
    4. and restart the AppletViewer (in the same DOS box)
    If none of these work, try:
        java -verbose sun.applet.AppletViewer
    
    
    This lists the classes that are being loaded. From this output, you can determine which class the AppletViewer is trying to load and where it's trying to load it from. Check to make sure that the class exists and is not corrupted in some way.
  5. Appletviewer locks up
  6. This happens with NT Workstation 4.0, update 3, where the DISPLAY is configured for "true color". The appletviewer (and perhaps other entities) will lock up by running and then freezing the system consuming 100% CPU. (This problem has been seen in the JDK 1.0.2.)
    To "test" this run the "java -verbose sun.applet.AppletView" and notice that it locks up when it tries to run the MTookit.class.
  7. Error Message: Exception in thread NULL
  8. If you are getting the fatal error message: Exception in thread NULL, when running java, javac, or appetviewer, you should check your CLASSPATH environment variable. It may list the the 'classes' directory from an older JDK software release. You can either unset the CLASSPATH variable, or set it to include only the latest version of the JDK class library. For example:
    C:\> set CLASSPATH=.;C:\jdk1.1.8\lib\classes.zip
    
    
    This will ensure that you are using the correct classes for this release.
  9. Cannot close AppletViewer copyright window (Microsoft Windows 95 only)
  10. In Microsoft Windows 95, the launch bar may partially cover the Applet Viewer copyright notice window Accept and Reject buttons. If this happens, you can move the launch bar to the side of the desktop to allow access to the copyright window Accept and Reject buttons.
  11. Error Message: Could not read properties file
  12. If you get this error message when running one of the JDK software tools such as the appletviewer, it may mean that your JAVA_HOME environment variable is not set properly. Normally, you shouldn't have to worry about setting JAVA_HOME. However, some Java IDEs set the JAVA_HOME variable to a value that won't allow you to run from the JDK software. From the DOS prompt, check to see if your JAVA_HOME variable has been set by using the command:
     set
    
    
    This will list all of the environment variables that are set. JAVA_HOME will not appear if it is not set. If a value is set for JAVA_HOME, unsetting it should allow you to run the JDK tools. You may want to make a note of the current JAVA_HOME setting before you unset it, in case you want to restore it later. You can unset the JAVA_HOME environment variable by setting it to no value, as follows:
     set JAVA_HOME=
    
    
    If you still cannot run the JDK tools after unsetting JAVA_HOME, you can try setting JAVA_HOME to the absolute path of the jdk1.1.8 directory that was created when you installed the JDK software. For example, if the directory jdk1.1.8 has the path C:\java\jdk1.1.8, you can try setting JAVA_HOME as follows:
     set JAVA_HOME=C:\java\jdk1.1.8
    
    
    As long as you have not disturbed the bin and lib directories that are immediately below the jdk1.1.8 directory, you should be able to run the JDK tools.
  13. Error Message: Invalid JAVA_HOME
  14. This error message indicates that your JAVA_HOME environment variable has been set to a value that is not compatible with running the JDK tools. You should try to correct the problem by following the suggestions given above under "Error Messages: Could not read properties file".

Running Applets With The Appletviewer

AppletViewer allows you to run one or more Java applets that are called by reference in a web page (HTML file) using the APPLET tag. The AppletViewer finds the APPLET tags in the HTML file and runs the applets (in separate windows) as specified by the tags.

AppletViewer is for viewing applets. It cannot display an entire web page that contains many HTML tags. It parses only the APPLET tag and no other HTML on the web page.

To run an applet with appletviewer, you go to a command line for your operating system and run appletviewer, passing in the filename or URL of the web page as its argument.

Here is an example of how to invoke AppletViewer on a file-based web page in Microsoft Windows. Go to a DOS prompt, change to the "jdk1.1.8" directory and then execute:

C:\

              bin\appletviewer demo\GraphLayout\example1.html
            

*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.