home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 July & August / Pcwk78a98.iso / Internet / Javadraw / DATA.Z / readme < prev    next >
Text File  |  1997-09-09  |  36KB  |  876 lines

  1.                              README
  2.  
  3.                     Java(tm) Development Kit
  4.                          JDK(tm) 1.1.4
  5.  
  6. -----------------------------------------------------------------------
  7. CONTENTS
  8.  
  9.  
  10.   Overview of Java
  11.     - Introduction
  12.     - Purpose
  13.     - Version Compatibility
  14.     - Bug Fixes
  15.     - What the JDK Contains
  16.     - Where to Find More Information
  17.     - Submitting Comments
  18.     - Reporting Bugs and Requesting Features
  19.     - JavaBeans(tm) and the Beans Development Kit
  20.  
  21.   Installing and Running Java
  22.     - Installation Notes
  23.     - Windows
  24.       - Running Java Tools in Microsoft Windows
  25.       - Microsoft Windows PATH and CLASSPATH
  26.       - Microsoft Windows Installation Troubleshooting
  27.     - Solaris
  28.       - Running Java Tools in Solaris
  29.       - Solaris PATH and CLASSPATH
  30.       - Solaris Installation Troubleshooting
  31.     - Running Applets with the AppletViewer
  32.     - Debugging Programs with the Java Debugger
  33.  
  34.  
  35. =======================================================================
  36.                            OVERVIEW OF JAVA
  37. =======================================================================
  38.  
  39. -----------------------------------------------------------------------
  40. INTRODUCTION
  41. -----------------------------------------------------------------------
  42. Thank you for downloading the JDK(tm) 1.1.4 release.
  43.  
  44. This is version 1.1.4 of the Java Development Kit, also known as 
  45. JDK 1.1.4.  The JDK is a development environment for writing 
  46. applets and applications that conform to the Java 1.1 Core API.  
  47. Its compiler and other tools are run from a shell and have no
  48. GUI interface. This version includes improvements in functionality, 
  49. performance, and quality over JDK 1.0.2, and includes 
  50. bug fixes since JDK 1.1.3.
  51.  
  52. JDK 1.1.4 is a bug-fix release.  Changes made to the JDK since 
  53. the first 1.1 beta release are in the file named CHANGES.
  54.  
  55. Because there are no API changes in bug-fix releases, we continue 
  56. to refer to this platform as the Java Platform 1.1 (rather than 1.1.4).   
  57. While bugs have been fixed in 1.1.4, the platform hasn't changed.
  58.  
  59. The Java Platform 1.1 offers new capabilities:  Internationalization, 
  60. signed applets, JAR file format, AWT (window toolkit) enhancements, 
  61. JavaBeans(tm) component model, networking enhancements, Math package for 
  62. large numbers, Remote Method Invocation (RMI), Reflection, database 
  63. connectivity (JDBC), new Java Native Interface, Object Serialization, 
  64. Inner Classes, and performance enhancements.
  65.  
  66. For further description of these features, see the "New Feature 
  67. Summary" in the JDK documentation.
  68.  
  69. As part of our ongoing effort to improve the quality of the JDK,
  70. we will continue to fix bugs and develop new features.
  71. In order to help us prioritize our bug-fixing effort, please submit
  72. any bugs you find as soon as possible, using the procedure described 
  73. in the "Reporting Bugs" section below.
  74.  
  75. The JDK is a product of Sun Microsystems, Inc.  
  76. JavaSoft, an operating company of Sun, develops the JDK.
  77.  
  78.  
  79. -----------------------------------------------------------------------
  80. PURPOSE
  81. -----------------------------------------------------------------------
  82. The JDK allows you to:
  83.  
  84.       - Develop applets that will run in browsers supporting the
  85.         Java Platform 1.1, such as HotJava version 1.0, and future 
  86.         versions of Netscape Navigator and Microsoft Internet Explorer.
  87.  
  88.       - Develop Java applications.  Applications run without the
  89.         need for a browser. (HotJava itself is a Java application.)
  90.  
  91.  
  92. -----------------------------------------------------------------------
  93. VERSION COMPATIBILITY
  94. -----------------------------------------------------------------------
  95. In general, any applet or application that ran in JDK 1.0.2 should
  96. run correctly in JDK 1.1.4.  A failure to do so is a bug, except 
  97. for a small number of cases where compatibility has had to be
  98. broken to close potential security holes, or fix implementation 
  99. or design bugs.  
  100.  
  101. Of course, applets that depend on any new 1.1 APIs will not work on 
  102. any browsers that support only 1.0.2, such as Internet Explorer 3.0, 
  103. Netscape 3.0, and the alpha and pre-beta1 versions of the HotJava 
  104. browser.  However, in general, applets relying only on APIs defined 
  105. in 1.0.2 (but compiled with the JDK 1.1 compiler) will run on 1.0.2 
  106. browsers.  This "downwards" compatibility has not been extensively 
  107. tested and cannot be guaranteed. 
  108.  
  109. For more details, see the document on compatibility at:
  110.  
  111.    http://java.sun.com/products/jdk/1.1/compatibility.html
  112.  
  113. If you find any such incompatibilities that are not listed on the
  114. Compatibility web page, please report them to us as noted below
  115. under "Reporting Bugs," and mention that they are compatibility
  116. bugs.  Compatibility is critically important to us, and a cornerstone
  117. of the Java promise: Write Once, Run Anywhere(tm).
  118.  
  119.  
  120. -----------------------------------------------------------------------
  121. BUG FIXES
  122. -----------------------------------------------------------------------
  123. As with any release, we will continue vigorously testing and 
  124. debugging the JDK.  If we uncover any important bugs, we will 
  125. post them on the JavaSoft web site at:
  126.  
  127.    http://java.sun.com/products/jdk/1.1/bugs.html
  128.  
  129. As always, your comments and bug reports are important to making 
  130. future releases successful.  We will use your feedback to help plan 
  131. future releases.  Please report bugs, request features and submit 
  132. comments using the procedure noted below in the sections "Submitting 
  133. Comments" and "Reporting Bugs and Requesting Features". 
  134.  
  135.  
  136. -----------------------------------------------------------------------
  137. WHAT THE JDK CONTAINS
  138. -----------------------------------------------------------------------
  139.  
  140. JAVA RUNTIME ----------------------------------------------------------
  141.  
  142.     - Java Core Classes (classes.zip)
  143.             DO NOT UNZIP THIS FILE!  It must remain zipped for the
  144.             compiler and interpreter to access the class files
  145.             within it properly.  This file contains all of the
  146.             the compiled .class files for the JDK.
  147.  
  148. JAVA SOURCE FILES -----------------------------------------------------
  149.  
  150.     - Java Source Files for Public Classes 
  151.             (src.zip file or src directory)
  152.             This is the set of source files used to create the
  153.             classes included in the Java Core Classes classes.zip 
  154.             file (above).  These source files are provided for 
  155.             information purposes only, to help developers learn
  156.             and use Java.  They do not include the private 
  157.             java.* classes or the sun.* classes, and therefore 
  158.             cannot be compiled into a complete classes.zip file.
  159.  
  160.             Do not modify these classes;  instead, create subclasses
  161.             and override where you need to. These classes are 
  162.             documented in the API Reference documentation, which is 
  163.             generated by javadoc.  
  164.  
  165.             How this is installed depends on the platform:
  166.  
  167.              - On Windows, these are automatically unzipped for you
  168.                during installation.
  169.  
  170.              - On Solaris, you must unzip the src.zip file yourself.
  171.                You can get a free copy of the correct version
  172.                of unzip in source form (which you must compile) from:
  173.  
  174.                http://www.cdrom.com/pub/infozip/zlib/
  175.  
  176.                or 
  177.  
  178.                ftp://ftp.cdrom.com/pub/infozip/zlib/
  179.  
  180.            or
  181.  
  182.            ftp://ftp.uu.net/pub/archiving/zip/UNIX/SUN/
  183.               
  184. JAVA TOOLS ------------------------------------------------------------
  185.  
  186.     - Java Compiler (javac)
  187.             Compiles programs written in the Java programming language
  188.             into bytecodes.
  189.  
  190.     - Java Interpreter (java)
  191.             Executes Java bytecodes.  In other words, it runs 
  192.             programs written in the Java programming language.
  193.  
  194.     - Jave Runtime Interpreter (jre)
  195.         Similar to the Java Interpreter (java), but intended for 
  196.         end users who do not require all the development-related 
  197.             options available with the java tool.
  198.  
  199.     - Java AppletViewer (appletviewer)
  200.             Used for testing and running applets.
  201.  
  202.     - Java Debugger (jdb)
  203.             Helps you find bugs in Java programs.
  204.  
  205.     - Class File Disassembler (javap)
  206.             Disassembles compiled Java files and prints out a
  207.             representation of the Java bytecodes.
  208.  
  209.     - Java Documentation Generator (javadoc)
  210.             Parses the declarations and documentation comments in
  211.             a set of Java source files and produces a set of HTML pages
  212.             describing the public and protected classes, interfaces,
  213.             constructors, methods, and fields. Also produces
  214.             a class hierarchy and an index of all members.
  215.  
  216.     - C Header and Stub File Generator (javah)
  217.             For attaching native methods to Java code.
  218.  
  219.     - Java Archive Tool (jar)
  220.             Combines many Java class files and other resources
  221.             into a single jar file.
  222.  
  223.     - Digital Signing Tool (javakey)
  224.             Manages entities, including their keys, certificates,
  225.             and the trust associated with them.
  226.  
  227.     - Native-To-ASCII Converter (native2ascii)
  228.             Converts a native encoding file to an ascii
  229.             file that includes the \udddd Unicode notation.
  230.  
  231.     - Java RMI Stub Converter (rmic)
  232.             Generates objects from the names of compiled Java classes
  233.             that contain remote object implementations.
  234.  
  235.     - Java Remote Object Registry (rmiregistry)
  236.             Creates and starts a remote object registry on the
  237.             specified port of the current host.
  238.  
  239.     - Serial Version Command (serialver)
  240.             Returns the serialVersionUID for one or more classes
  241.             in a form suitable for copying into an evolving class.
  242.  
  243.     - AWT 1.1 Conversion Tool (updateAWT)
  244.             Included with the JDK AWT documentation,
  245.             rather than in the bin directory.
  246.             Updates deprecated 1.0 AWT names to new 1.1 AWT
  247.             names (for Sun Solaris and UNIX systems, or Windows
  248.             systems with the MKS toolkit).
  249.  
  250.     - Various C libraries and include files
  251.  
  252. JAVA DOCUMENTATION AND DEMOS ------------------------------------------
  253.  
  254.     - demo directory
  255.             awt-1.1         AWT demos
  256.             i18n            Internationalization demos
  257.  
  258.             Animator        General-purpose animator
  259.             ArcTest         Test arc drawing and filling
  260.             BarChart        Simple bar-chart applet
  261.             Blink           Blinking, multicolored text
  262.             CardTest        Test card layout manager
  263.             Clock           Analog clock
  264.             DitherTest      Test image dithering
  265.             DrawTest        Draw points and lines
  266.             Fractal         Fractal figures
  267.             GraphLayout     Graph layout by iterated relaxation
  268.             GraphicsTest    Test graphics operations
  269.             ImageMap        Live-feedback image map
  270.             JumpingBox      Catch the jumping box
  271.             MoleculeViewer  Three-dimensional chemical model viewer
  272.             NervousText     Nervous text
  273.             SimpleGraph     Draw a simple graph
  274.             SortDemo        Animated sorting algorithms
  275.             SpreadSheet     Simple spreadsheet
  276.             TicTacToe       Tic-tac-toe game
  277.             WireFrame       Three-dimensional wire-frame model viewer
  278.  
  279.       RMI demos are available in the separately-downloadable 
  280.       JDK documentation.  See the entry "Demonstration Applets
  281.       and Applications" in the JDK documentation table of 
  282.       contents for access.
  283.  
  284.     - README
  285.             This file you are currently reading
  286.  
  287.     - CHANGES
  288.             Changes made in the beta and final JDK releases
  289.  
  290.     - COPYRIGHT
  291.             Copyright notice for the JDK software
  292.  
  293.     - LICENSE
  294.             License agreement for the JDK software
  295.  
  296. NOTE: The JDK does NOT include a Web browser.  To obtain the HotJava(tm)
  297. Browser, see the HotJava Browser web page:
  298.  
  299.       http://java.sun.com/products/hotjava/
  300.  
  301.  
  302. -----------------------------------------------------------------------
  303. WHERE TO FIND MORE INFORMATION
  304. -----------------------------------------------------------------------
  305. This README file and the accompanying CHANGES, LICENSE, COPYRIGHT files,
  306. demo directory, and Java source code (src.zip) are the only
  307. "documentation" included in this JDK software bundle.
  308.  
  309. The rest of the documentation is in a separately-downloaded bundle
  310. known as the "JDK 1.1.4 Documentation," and is available from the same
  311. download page where you got this software:
  312.  
  313.           http://java.sun.com/products/jdk/1.1/
  314.  
  315. This JDK 1.1.4 Documentation includes the following information:
  316.  
  317.  - JDK Release Notes
  318.  - JDK API Reference
  319.  - JDK Guide to New Features
  320.  - JDK Demos
  321.  - JDK Tools Documentation
  322.  - Java Tutorial
  323.  
  324.  
  325. -----------------------------------------------------------------------
  326. SUBMITTING COMMENTS
  327. -----------------------------------------------------------------------
  328. We are very interested in receiving your comments and suggestions
  329. as early as possible.  
  330.  
  331. If you have a specific feature request or bug to report, please 
  332. refer to the next section for how to submit it. Send other comments 
  333. and informal suggestions directly to us at our JavaSoft email addresses 
  334. at Sun, which are listed at:
  335.  
  336.      http://java.sun.com/mail/
  337.  
  338. Here is a summary of what is on this web page:
  339.  
  340.  - Technical Help - Sun does not provide free technical help.
  341.    See the above web page for some places to obtain help with your
  342.    programming problems.
  343.  
  344.  - JavaSoft Email Addresses - The following are our most current
  345.    email addresses as of this release.  Use these for sending in 
  346.    comments and informal suggestions. 
  347.  
  348.       java-intl@java.sun.com                   Internationalization
  349.       java-awt@java.sun.com                    AWT package
  350.       java-security@java.sun.com               Security package
  351.       java-io@java.sun.com                     IO package
  352.       java-net@java.sun.com                    Net package
  353.       jdbc@wombat.eng.sun.com                  JDBC package
  354.       jdbc-odbc@wombat.eng.sun.com             JDBC-ODBC bridge
  355.       java-beans@java.sun.com                  Beans package
  356.       reflection-comments@worthy.eng.sun.com   Reflection package
  357.       jni@java.sun.com                         Java Native Interface
  358.  
  359.    If your comment does not fall into any of those categories,
  360.    please send it to:
  361.  
  362.       jdk-comments@java.sun.com                General comments
  363.  
  364.    While we are not able to respond individually to each comment,
  365.    we do review all comments.
  366.  
  367.  
  368. -----------------------------------------------------------------------
  369. REPORTING BUGS AND REQUESTING FEATURES
  370. -----------------------------------------------------------------------
  371. To report bugs or feature requests, go to this web page:
  372.  
  373.      http://java.sun.com/cgi-bin/bugreport.cgi
  374.  
  375. This gives you instructions for checking if your bug is a duplicate
  376. by allowing you to look in our known bugs list.  This also gives
  377. instructions for how to submit bugs and request features.
  378.  
  379. Please be aware that bugs that you submit will not necessarily 
  380. appear on the "Known Bugs" or "Fixed Bugs" pages, as we post 
  381. only major bugs there.
  382.  
  383. When submitting a bug, be sure you include the version number of
  384. the JDK you are running.  You can get the version number of the JDK 
  385. by executing:
  386.  
  387.     java -version
  388.  
  389.  
  390. -----------------------------------------------------------------------
  391. JAVABEANS(tm) AND THE BEANS DEVELOPMENT KIT
  392. -----------------------------------------------------------------------
  393. A version of the Beans Development Kit (BDK) is also available for 
  394. immediate download from JavaSoft.  BDK includes specific tools and 
  395. support for JavaBeans developers such as the BeanBox test containers
  396. and example beans. See:
  397.  
  398.     http://java.sun.com/beans/bdk_download.html
  399.  
  400. We will continue to ship the BDK in addition to the JDK.  
  401. Updates to the BDK, tools, and general JavaBeans information 
  402. will be posted on a regular basis to the JavaBeans web site:
  403.  
  404.      http://java.sun.com/beans
  405.  
  406.  
  407.  
  408. =======================================================================
  409.                    INSTALLING AND RUNNING JAVA
  410. =======================================================================
  411.  
  412. -----------------------------------------------------------------------
  413. INSTALLATION NOTES
  414. -----------------------------------------------------------------------
  415.     
  416.     IMPORTANT: Please make sure you understand the Copyright
  417.     and License information (in the files named COPYRIGHT and 
  418.     LICENSE) before installing this release.
  419.     
  420. The JDK 1.1.4 software and documentation are available in two separate
  421. downloadable compressed files, called "bundles".  They need to be 
  422. downloaded separately into the same directory and 
  423. unpacked as follows for the few links between them to work.
  424.  
  425. Here are the abbreviated instructions.  (The installation procedure 
  426. is different on different platforms, so these instructions are 
  427. quite general.)
  428.  
  429.   1. Go to the JDK Download page and download the software and
  430.      documentation separately:
  431.  
  432.         http://java.sun.com/products/jdk/1.1/
  433.  
  434.   2. Follow the installation instructions for your particular 
  435.      platform at:
  436.  
  437.       http://java.sun.com/products/jdk/1.1/installation-solaris2.html
  438.  
  439.         OR
  440.  
  441.       http://java.sun.com/products/jdk/1.1/installation-win32-x86.html
  442.  
  443.   3. Unpack the software and documentation bundles according to the
  444.      instructions on the web page given in step 2.  You should end up
  445.      with the directory structure shown below.
  446.  
  447.   4. Set the PATH and CLASSPATH for Windows or Solaris as
  448.      described in the section that follows.
  449.  
  450.   5. Use a web browser to go to your new, local JDK documentation
  451.      table of contents by opening the "index.html" file in the "docs" 
  452.      directory:  jdk1.1/docs/index.html
  453.  
  454.  
  455.                            jdk1.1.4
  456.     _________________________|_____________________________________
  457.    |      |         |      |      |   |     |     |    |    |      |
  458. README CHANGES COPYRIGHT LICENSE bin lib include demo src docs index.html
  459.                                   |   |     |     |    |    |
  460.                                                             |
  461.                                _____________________________|_____
  462.                               |       |        |       |          |
  463.                              api  tooldocs relnotes  guide    index.html
  464.                               |       |        |       |
  465.   
  466.  
  467.    The "src" directory shown above originally appears as a "src.zip"
  468.    file in the Solaris installation, which you must manually unzip.
  469.    On Windows, the installer automatically unzips it for you.
  470.  
  471.  
  472. -----------------------------------------------------------------------
  473. RUNNING JAVA TOOLS IN MICROSOFT WINDOWS
  474. -----------------------------------------------------------------------
  475.  
  476. After installing the JDK software, you start a tool by typing its
  477. name into the DOS window with a filename as an argument.  None of
  478. the main Java tools are Windows programs with GUI interfaces -- they
  479. are all run from the DOS command line.  (For example, if you 
  480. double-click on the Java Compiler "javac" icon, it will briefly 
  481. open and immediately close a DOS window, because that is not the 
  482. proper way to run it.)
  483.  
  484. You can specify the path to a tool either by typing the path in 
  485. front of the tool each time, or by adding the path to the 
  486. startup file (autoexec.bat).  For example, if the JDK is 
  487. installed at C:\jdk1.1.4, to run the compiler on a file
  488. myfile.java, go to a DOS shell and execute this:
  489.  
  490.     Type:  C:\jdk1.1.4\bin\javac myfile.java
  491.  
  492.      -or- 
  493.  
  494.     Add    C:\jdk1.1.4\bin to your path statement
  495.     Type:  javac myfile.java
  496.  
  497. See the next section about setting the PATH and CLASSPATH variables.
  498.  
  499. -----------------------------------------------------------------------
  500. MICROSOFT WINDOWS PATH and CLASSPATH
  501. -----------------------------------------------------------------------
  502.  
  503. The CLASSPATH is not required, but if it is set, it will need to be
  504. unset.  You may want to update the "path" variable for convenience.
  505.  
  506.      Developing in JDK 1.0.2 and 1.1.4 - If you want 
  507.      to develop in both JDK 1.0.2 and JDK 1.1.4, you must
  508.      set CLASSPATH (and PATH) separately for each one.  
  509.      To run both versions simultaneously, you can run 
  510.      each one from its own DOS window.  If you are running 
  511.      only one at a time, you can write a batch script to
  512.      switch the value of CLASSPATH (and PATH). 
  513.  
  514.      Windows NT only - If you are using Windows NT, it is  
  515.      preferable to make the following environment variable  
  516.      changes in the Control Panel. Start the Control Panel,  
  517.      select System, then edit the environment variables. 
  518.  
  519.   1. PATH -  Add the absolute path of the "jdk1.1.4\bin" 
  520.      directory to your PATH statement as follows. 
  521.  
  522.      The PATH statement enables Windows to find the executables 
  523.      (javac, java, javadoc, etc.) from any current directory.
  524.  
  525.      To find out the current value of your PATH, at the
  526.      DOS prompt type:
  527.  
  528.          C:\> path
  529.  
  530.      To change the PATH, open the AUTOEXEC.BAT file and make the
  531.      change to the PATH statement. To edit the AUTOEXEC.BAT
  532.      file in Windows 95: 
  533.  
  534.        i. Start a text editor by choosing "Start", "Programs", 
  535.           "Accessories", and choosing WordPad or NotePad. 
  536.       ii. Choose Open from the File menu and type "c:\autoexec.bat" 
  537.           for the filename This will open the file for editing. 
  538.      iii. Look for the PATH statement. Notice that the PATH statement
  539.           is a series of directories separated by semi-colons (;).  
  540.           Windows looks for programs in the PATH directories in order,
  541.           from left to right. Look for other JDK versions in the PATH.
  542.           There should only be one path to a classes.zip file.
  543.           When in doubt, put the java directory at the end of 
  544.           the path statement. For example, in the following PATH
  545.           statement, we have added the java directory at the end: 
  546.  
  547.            PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\JDK1.1.4\BIN 
  548.  
  549.      To make the path take effect, execute the following:
  550.  
  551.            C:\> autoexec.bat
  552.  
  553.  
  554.   2. CLASSPATH Environment Variable - If you follow the default 
  555.      installation, you do not need to set CLASSPATH, because the
  556.      tools automatically set it for you.  (This was actually
  557.      also true in all beta versions and the final version of 
  558.      JDK 1.1, but was undocumented.)  If your CLASSPATH has 
  559.      not previously been set, you can skip this step.
  560.  
  561.      UNSETTING CLASSPATH
  562.  
  563.        If you have previously set the CLASSPATH and want to
  564.        unset it, you normally need to change the current value
  565.        (at the command line) and the startup value (in a startup
  566.        file or script).  For example, to see if it is currently 
  567.        set, type:
  568.  
  569.           % set
  570.  
  571.        This lists all of the environment variables.  CLASSPATH
  572.        will not appear if it is not set.
  573.  
  574.        If it is set, you can unset the current value by setting
  575.        it to no value:
  576.  
  577.           % set CLASSPATH=
  578.  
  579.        Also open your startup file (autoexec.bat) or script and 
  580.        remove the path to the JDK classes from the CLASSPATH 
  581.        environment variable, if you want the change to be
  582.        permanent.
  583.  
  584.      WHAT CLASSPATH DOES
  585.  
  586.        The CLASSPATH tells the Java Virtual Machine and other Java 
  587.        applications (which are located in the "jdk1.1.4\bin" 
  588.        directory) where to find the class libraries, such as 
  589.        classes.zip file (which is in the lib directory).  
  590.        By default, the java tools temporarily append the 
  591.        following to whatever CLASSPATH you have explicitly 
  592.        set in your startup file:
  593.  
  594.        .;[bin]\..\classes;[bin]\..\lib\classes.zip
  595.  
  596.        where [bin] is substituted by the absolute path to the   
  597.        jdk1.1\bin directory.  Therefore, if you keep the bin and  
  598.        lib directories at the same directory level (that is, if 
  599.        they have a common parent directory), the Java executables 
  600.        will find the classes.  You need to set the CLASSPATH only 
  601.        if you move classes.zip or want to load a different library 
  602.        (such as one you develop).  
  603.  
  604.      Refer to the Windows Installation Troubleshooting section below 
  605.      if you have problems running the JDK.
  606.  
  607.  
  608. -----------------------------------------------------------------------
  609. MICROSOFT WINDOWS INSTALLATION TROUBLESHOOTING
  610. -----------------------------------------------------------------------
  611.  
  612. Here are four troubleshooting tips for Microsoft Windows.
  613.  
  614.    * If you see the following error message 
  615.  
  616.         net.socketException: errno = 10047
  617.  
  618.         -or-
  619.  
  620.         Unsupported version of Windows Socket API
  621.  
  622.      check which TCP/IP drivers you have installed. The AppletViewer
  623.      supports only the Microsoft TCP/IP drivers included with 
  624.      Windows 95. If you are using third-party drivers (e.g., 
  625.      Trumpet Winsock), you'll need to change over to the native
  626.      Microsoft TCP/IP drivers if you want to load applets over the
  627.      network. 
  628.  
  629.    * If the AppletViewer does not load applets then you might
  630.      try the following: 
  631.  
  632.       1. set HOMEDRIVE=c:
  633.          set HOMEPATH=\
  634.          and restart the AppletViewer (in the same DOS box) 
  635.  
  636.       2. set HOME=c:\
  637.          and restart the AppletViewer (in the same DOS box) 
  638.  
  639.      If none of these work, try: 
  640.  
  641.          java -verbose sun.applet.AppletViewer
  642.  
  643.      This lists the classes that are being loaded. From this output, 
  644.      you can determine which class the AppletViewer is trying to 
  645.      load and where it's trying to load it from. Check to make sure
  646.      that the class exists and is not corrupted in some way. 
  647.  
  648.    * Error Message: "Exception in thread NULL"
  649.      or "Unable to initialize threads: cannot find class 
  650.      java/lang/Thread" (yes, with forward slashes)
  651.  
  652.      If you are getting one of these fatal error messages 
  653.      when running java, javac, or appetviewer, you should check 
  654.      your CLASSPATH environment variable. It may list 
  655.      "c:\java" or the "classes" directory from an older 
  656.      JDK release.  You can either unset the CLASSPATH variable, 
  657.      or set it to include only the latest version of the JDK class 
  658.      library.  For example: 
  659.  
  660.         C:\> set CLASSPATH=.;C:\jdk1.1.4\lib\classes.zip
  661.  
  662.      This will make sure that you are using the correct classes 
  663.      for this release.
  664.  
  665.    * Cannot close AppletViewer copyright window (Windows 95 only)
  666.      In Microsoft Windows 95, the launch bar may partially cover
  667.      the AppletViewer copyright notice window Accept and Reject 
  668.      buttons. If this happens, you can move the Windows 95
  669.      launch bar to the side of the desktop to allow access to 
  670.      the copyright window Accept and Reject buttons.
  671.  
  672.  
  673. -----------------------------------------------------------------------
  674. RUNNING JAVA TOOLS IN SOLARIS
  675. -----------------------------------------------------------------------
  676.  
  677. After installing the JDK software, you start a tool by typing its
  678. name into a shell window with a filename as an argument.  You can 
  679. specify the path to a tool either by typing the path in front of 
  680. the tool each time, or by adding the path to the startup file.  
  681. For example, if the JDK is installed at /usr/local/jdk1.1.4, 
  682. to run the complier on a file myfile.java, go to a shell and execute:
  683.  
  684.     Type:  /usr/local/jdk1.1.4/bin/javac myfile.java
  685.  
  686.      -or- 
  687.  
  688.     Add  /usr/local/jdk1.1.4/bin to your path statement 
  689.     Type:  javac myfile.java
  690.  
  691. The path and CLASSPATH variables are not required, but it is helpful 
  692. to know more about them.  See the next section about setting these 
  693. variables.
  694.  
  695.  
  696. -----------------------------------------------------------------------
  697. SOLARIS PATH and CLASSPATH
  698. -----------------------------------------------------------------------
  699.  
  700. The CLASSPATH is not required, but if it is set, it will need to be 
  701. unset.  You may want to update the "path" variable for convenience.
  702.  
  703.      NOTE - If you want to develop in both JDK 1.0.2 and 
  704.      JDK 1.1.4, you must set CLASSPATH (and path) separately
  705.      for each one.  To run both versions simultaneously, you 
  706.      can run each one from its own shell window.  If you are
  707.      running only one at a time, you can write a batch script 
  708.      to switch the value of CLASSPATH (and PATH). 
  709.  
  710.   1. Path Variable -  Add the absolute path of the "jdk1.1.4/bin"
  711.      directory to your Unix path variable, as follows.  
  712.  
  713.      The path variable enables Solaris to find the executables 
  714.      (javac, java, javadoc, etc.) from any current directory.
  715.      To find out if the path is currently set for any java tools,
  716.      execute:
  717.  
  718.         % which java
  719.  
  720.      This will print the path to java, if it can find it.
  721.  
  722.      If you use the C shell (csh), you can set the path in 
  723.      your startup file (~/.cshrc) as follows, for example:
  724.  
  725.         set path=($path /usr/local/jdk1.1.4/bin)
  726.  
  727.      Then load the startup file and verify that the path 
  728.      is set by repeating the "which" command above:
  729.  
  730.         % source ~/.cshrc
  731.         % which java
  732.  
  733.   2. CLASSPATH Environment Variable - If you follow the default 
  734.      installation, you do not need to set CLASSPATH, because the
  735.      shell scripts automatically set it for you.  (This was actually
  736.      also true in all beta versions and the final version of 
  737.      JDK 1.1, but was undocumented.)  If your CLASSPATH has 
  738.      not previously been set, you can skip this step.
  739.  
  740.  
  741.      If you want to develop in both JDK 1.0.2 and JDK 1.1.4, 
  742.      you must set CLASSPATH separately for each one.  To run
  743.      both simultaneously, run each one in its own DOS window.
  744.      If you are running only one at a time, you can write a batch 
  745.      script to switch the value of CLASSPATH. 
  746.  
  747.      UNSETTING CLASSPATH
  748.  
  749.        If you have previously set the CLASSPATH and want to
  750.        unset it, you normally need to change the current value
  751.        (at the command line) and the startup value (in a startup
  752.        file or script).  For example, to see if it is currently 
  753.        set, type:
  754.  
  755.           % echo $CLASSPATH
  756.  
  757.        If it is set, you can unset the current value by typing:
  758.  
  759.           % unsetenv CLASSPATH
  760.  
  761.        Also open your startup file (~/.cshrc) or script and 
  762.        remove the path to the JDK classes from the CLASSPATH 
  763.        environment variable if you want the change to be 
  764.        permanent.
  765.  
  766.      WHAT CLASSPATH DOES
  767.  
  768.        The CLASSPATH tells the Java Virtual Machine and other Java 
  769.        applications (which are located in the "jdk1.1.4/bin" directory) 
  770.        where to find the class libraries, such as classes.zip file  
  771.        (which is in the lib directory).  By default, the java tools 
  772.        temporarily append the following to whatever CLASSPATH 
  773.        you have explicitly set in your startup file:
  774.  
  775.        .:[bin]/../classes:[bin]/../lib/classes.zip
  776.  
  777.        where [bin] is substituted by the absolute path to the 
  778.        jdk1.1/bin directory.  Therefore, if you keep the bin and 
  779.        lib directories at the same directory level (that is, if
  780.        they have a common parent directory), the Java executables
  781.        will find the classes.  You need to set the CLASSPATH only 
  782.        if you move classes.zip or want to load a different library
  783.        (such as one you develop).  
  784.  
  785.      Refer to the Solaris Installation Troubleshooting section below 
  786.      if you have problems running the JDK.
  787.  
  788. -----------------------------------------------------------------------
  789. SOLARIS INSTALLATION TROUBLESHOOTING
  790. -----------------------------------------------------------------------
  791.  
  792.    * Error Message: "Exception in thread NULL"
  793.      or "Unable to initialize threads: cannot find class java/lang/Thread"
  794.  
  795.      If you are getting one of these fatal error messages 
  796.      when running java, javac, or appetviewer, you should check 
  797.      your CLASSPATH environment variable. It may list 
  798.      "java" or the "classes" directory from an older 
  799.      JDK release.  You can either unset the CLASSPATH variable, 
  800.      or set it to include only the latest version of the JDK class 
  801.      library.  For example: 
  802.  
  803.      % setenv CLASSPATH .:/usr/local/jdk1.1.4/lib/classes.zip
  804.  
  805.      This will ensure that you are using the correct classes for 
  806.      this release.
  807.  
  808.  
  809. -----------------------------------------------------------------------
  810. RUNNING APPLETS WITH THE APPLETVIEWER
  811. -----------------------------------------------------------------------
  812. AppletViewer allows you to run one or more Java applets that are 
  813. called by reference in a web page (HTML file) using the APPLET tag.
  814. The AppletViewer finds the APPLET tags in the HTML file and runs 
  815. the applets (in separate windows) as specified by the tags.
  816.  
  817. AppletViewer is for viewing applets.  It cannot display an entire 
  818. web page that contains many HTML tags.  It parses only the APPLET 
  819. tag and no other HTML on the web page.
  820.   
  821. To run an applet with appletviewer, you go to a command line for 
  822. your operating system and run appletviewer, passing in the filename 
  823. or URL of the web page as its argument. 
  824. _______
  825. SOLARIS
  826.  
  827.   Here is an example of how to invoke AppletViewer on a file-based
  828.   web page in Solaris.  First change to the "jdk1.1.4" directory.  
  829.   Then execute:
  830.  
  831.   bin/appletviewer demo/GraphLayout/example1.html
  832.  
  833.   Here is an example of how to invoke AppletViewer on a URL-based
  834.   web page in Solaris. Execute:
  835.  
  836.   bin/appletviewer http://java.sun.com/applets/NervousText/example1.html
  837. _______
  838. WINDOWS
  839.   Here is an example of how to invoke AppletViewer on a file-based
  840.   web page in Windows.  Go to a DOS prompt, change to the "jdk1.1.4" 
  841.   directory and then execute:
  842.  
  843.   bin\appletviewer demo\GraphLayout\example1.html
  844.  
  845.   Here is an example of how to invoke AppletViewer on a URL-based
  846.   web page in Windows. Execute:
  847.  
  848.   bin\appletviewer http://java.sun.com/applets/NervousText/example1.html
  849.  
  850. -----------------------------------------------------------------------
  851. DEBUGGING PROGRAMS WITH THE JAVA DEBUGGER (JDB)
  852. -----------------------------------------------------------------------
  853. You can debug applets using the -debug option of appletviewer.
  854. When debugging applets, it's best to invoke appletviewer from
  855. the directory that contains the applet's HTML file.  For example,
  856. on Solaris:
  857.  
  858.      cd demo/TicTacToe
  859.      ../../bin/appletviewer -debug example1.html
  860.  
  861. On the PC:
  862.  
  863.      cd demo\TicTacToe
  864.      ..\..\bin\appletviewer -debug example1.html
  865.  
  866. You can find documentation on the debugger and its API at:
  867.  
  868.      http://java.sun.com/products/jdk/1.1/debugging/
  869.  
  870.  
  871. -----------------------------------------------------------------------
  872. Copyright ╗ 1996,1997 Sun Microsystems, Inc.
  873. 901 San Antonio Rd., Palo Alto, CA 94303 USA
  874. All rights reserved.
  875.  
  876.