|
Microsoft Windows NT (x86) and Windows 95 / 98 Installation Instructions | Troubleshooting | Running Applets Windows Installation Instructions The installation and configuration process can be broken down into the following steps: If you experience trouble along the way, check the Troubleshooting the Installation section at the end of this document.1. Run the JDK installer, if necessary If you downloaded the JDK software file instead of running the installer from the JavaSoft web site, you should check to see that the complete file was downloaded:2. Update PATH and CLASSPATH variables It is possible for you to run the JDK without modifying any system environment variables (such as PATH or CLASSPATH) or modifying AUTOEXEC.BAT. However, you should test that CLASSPATH is not set, and most developers set PATH as a convenience.
C:> path PATH C:\WINDOWS; C:\WINDOWS\COMMAND; C:\;C:\DOS; C:\JDK1.1.6\BIN C:> autoexec.bat
C:> 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: 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.
.;[bin]\..\classes;[bin]\..\lib\classes.zipwhere [bin] is substituted by the absolute path to the jdk1.1.6\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). 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 Windows programs with GUI interfaces -- they are all run from the DOS command line. You can't run a JDK tool by double-clicking its icon.
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/98. 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.
then you might try the following:
set HOMEPATH=\ and restart the AppletViewer (in the same DOS box) and restart the AppletViewer (in the same DOS box) 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.
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.
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.6\lib\classes.zipThis will ensure that you are using the correct classes for this release.
In Microsoft Windows 95/98, 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/98 launch bar to the side of the desktop to allow access to the copyright window Accept and Reject buttons.
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 the jdk1.1.6 directory that was created when you installed the JDK. For example, if the directory jdk1.1.6 has the path C:\java\jdk1.1.6, you can try setting JAVA_HOME as follows: set JAVA_HOME=C:\java\jdk1.1.6As long as you have not disturbed the bin and lib directories that are immediately below the jdk1.1.6 directory, you should be able to run the JDK tools.
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.C:\>bin\appletviewer http://java.sun.com/applets/Blink/example1.html Debugging Programs With The Java Debugger (Jdb) --> *As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform. | ||||||||
|
| ||||||||||||