JavaTM Development Kit
Note: The server at Sun is frequently overloaded with requests. Please be patient.
Go to the previous download page to download the following two files.
- JDK SOFTWARE:
Go to the download page and download the Windows version of the JDK software and install it. When it asks you to specify a directory, you can use "C:\JDK1.1.1" (the default) or whatever name you prefer.
If using Internet Explorer, you have two options; if using Netscape Navigator or HotJava, you have only the "Save As" option below:
- Open - This enables you to install the JDK without leaving a compressed file on your hard disk.
- Save As - This saves the compressed file in C:\ by default, without installing it. Check that you have downloaded the full, uncorrupted software file:
After downloading this file, you can double-click on its icon to run the installer. Follow the instructions the installer provides. When done with the installation, to recover more disk space, delete the compressed file.jdk1_1_1-win32-x86.exe
8,129,944 bytesFilename Change - The original filename of the compressed file on the JavaSoft server contains three periods (jre1.1.1-win32-x86.exe). The first two periods may be changed to underscores when you download the file.
- JDK DOCUMENTATION:
NOTE - As we find errata in our documentation, we will be updating the online version on our website, and not necessarily updating the downloaded version as frequently. The changes are recorded at JDK 1.1.1 Documentation Changes. You might consider whether it's more convenient for you to use the documentation on our website instead of downloading it.Go to the download page and download the JDK documentation to the parent directory of the jdk1.1.1 directory. Then unzip the file -- the files will be unzipped into the docs directory as shown in the diagram below.For example, if you installed the software (above) at C:\jdk1.1.1, then you would download the docs to C:\ and unzip the file there.
Do not unzip the downloaded file inside the jdk1.1.1 directory -- that would cause another jdk1.1.1 directory to be created inside the first jdk1.1.1 directory.
NOTE - The JDK Documentation accommodates all operating system platforms.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.javaSee 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.
- 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:> pathTo 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:
- Start a text editor by choosing "Start", "Programs", "Accessories", and choosing WordPad or NotePad.
- Choose Open from the File menu and type "c:\autoexec.bat" for the filename This will open the file for editing.
- 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\BINTo make the path take effect, execute the following:
C:> autoexec.bat- 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:
% setThis 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.zipwhere [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.htmlPlease 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
- If you see the following error message
net.socketException: errno = 10047-or-Unsupported version of Windows Socket APIcheck which TCP/IP drivers you have installed. The AppletViewer supports only the Microsoft TCP/IP drivers included with 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.
- If the AppletViewer does not load applets
then you might try the following:
- set HOMEDRIVE=c:
set HOMEPATH=\
and restart the AppletViewer (in the same DOS box)- set HOME=c:\
and restart the AppletViewer (in the same DOS box)If none of these work, try:
java -verbose sun.applet.AppletViewerThis 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.
- Error Message: Exception in thread NULL
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 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.1\lib\classes.zipThis will make sure that you are using the correct classes for this release.
- Cannot close AppletViewer copyright window (Windows 95 only)
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 Windows 95 launch bar to the side of the desktop to allow access to the copyright window Accept and Reject buttons.
- Error Message: Could not read properties file
If you get this error message when running one of the JDK 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. From the DOS prompt, check to see if your JAVA_HOME variable has been set by using the command:setThis 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 thejdk1.1.1
directory that was created when you installed the JDK. For example, if the directoryjdk1.1.1
has the pathC:\java\jdk1.1.1
, you can try setting JAVA_HOME as follows:set JAVA_HOME=C:\java\jdk1.1.1As long as you have not disturbed thebin
andlib
directories that are immediately below thejdk1.1.1
directory, you should be able to run the JDK tools.
- Error Message: Invalid JAVA_HOME
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".
JavaTM Development Kit