JavaTM Development Kit

Download and Installation Instructions

Microsoft Windows NT (Intel) and Windows 95

JavaTM Development Kit

Version JDK 1.1.1


The downloading, installing, and configuring process can be broken down into the following steps:
  1. Download the JDK software and documentation separately
  2. Running the Java Tools
  3. Update PATH and CLASSPATH
If you experience trouble along the way, check the Troubleshooting the Installation section at the end of this document.
Note: The server at Sun is frequently overloaded with requests. Please be patient.

Step 1: Download the JDK software and documentation

Go to the previous download page to download the following two files.

Installed Directory Tree
The following directory structure is what the JDK software and documentation directories should look like after you've finished installing it:
                           jdk1.1.1
    _________________________|_____________________________________
   |      |         |      |      |   |     |     |    |    |      |
README CHANGES COPYRIGHT LICENSE bin lib include demo src docs index.html
                                  |   |     |     |    |    |
                                                            |
                                                            |
                               _____________________________|____
                              |       |        |       |         |
                             api  tooldocs relnotes  guide   index.html
                              |       |        |       |
If you don't unpack the software and documentation in the directories as shown above, the document links from docs/index.html to the README, CHANGES, COPYRIGHT, LICENSE, and demo files will be broken.

Included in the unpacked 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 to use it.

Step 2: Running Java Tools

After installing the JDK software, you start a tool by typing its name into the DOS window with a filename as an argument. None of the Java tools are Windows programs with GUI interfaces -- they are all run from the DOS command line. (For example, if you double-click on the Java Compiler "javac" icon, it will briefly open and immediately close a DOS window, because that is not the proper way to run it.)

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 startup file (autoexec.bat). For example, if the JDK is installed at C:\jdk1.1.1, to run the compiler on a file myfile.java, go to a DOS shell and execute this:

    Type:  C:\jdk1.1.1\bin\javac myfile.java
-or-
    Add    C:\jdk1.1.1\bin   to your path statement
    Type:  javac myfile.java
See the next section about setting the PATH and CLASSPATH variables.

Step 3: Update PATH and CLASSPATH

The CLASSPATH is not required, but if it is set, it will need to be unset. You may want to update the "path" variable for convenience.
Developing in JDK 1.0.2 and 1.1.1 - If you want to develop in both JDK 1.0.2 and JDK 1.1.1, you must set CLASSPATH (and PATH) separately for each one. To run both versions simultaneously, you can run each one from its own DOS window. If you are running only one at a time, you can write a batch script to switch the value of CLASSPATH (and PATH).

Windows NT only - If you are using Windows NT, it is preferable to make the following environment variable changes in the Control Panel. Start the Control Panel, select System, then edit the environment variables.

  1. PATH - Add the absolute path of the "jdk1.1.1\bin" directory to your PATH statement as follows.

    The PATH statement enables Windows to find the executables (javac, java, javadoc, etc.) from any current directory.

    To find out the current value of your PATH, at the DOS prompt type:

          C:> path
    
    To change the PATH, open the AUTOEXEC.BAT file and make the change to the PATH statement. To edit the AUTOEXEC.BAT file in 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 (;). Windows looks for programs in the PATH directories in order, from left to right. Look for other JDK versions in the PATH. There should only be one path to a classes.zip file. When in doubt, put the java directory at the end of the path statement. For example, in the following PATH statement, we have added the java directory at the end:
      PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\JDK1.1.1\BIN 
      

    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 tools automatically look in the lib directory if it is next to the bin directory. (This was actually also true in all beta versions and the final version of JDK 1.1, but was undocumented.) If your CLASSPATH has not previously been set, you can skip this step.

    UNSETTING CLASSPATH
     
    If you have previously set the CLASSPATH and want to unset it, you normally 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:
           % 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:
           % 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 applications (which are located in the "jdk1.1.1\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.1\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 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).

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


Start Using the JDK

Your computer system should now be configured and ready to use the Java Development Kit.

Unix Line Endings - All text files in the JDK have Unix line endings. This includes README, CHANGES, LICENSE, COPYRIGHT and all the properties files. These files will be practically unreadable in the simplest Windows text editors that ignore such line endings (such as Windows NotePad), but are readable in most editors built into development environments.
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:
    C:\> cd jdk1.1.1\demo\TicTacToe
2. Run the AppletViewer with the html file:
    C:\JDK1.1.1\DEMO\TICTACTOE> appletviewer example1.html

Please read Submit a Bug on the download page to get the list of known bugs and information on how to submit a bug.


Troubleshooting the Installation


JavaTM Development Kit