home *** CD-ROM | disk | FTP | other *** search
/ Freelog 2 / Freelog002.iso / Linux / Slackware / contrib / java / FAQ-java-linux.txt next >
Encoding:
Text File  |  1999-02-08  |  51.1 KB  |  1,415 lines

  1.   java-linux@java.blackdown.org FAQ
  2.   by Stephen Wynne
  3.   September 12, 1998
  4.  
  5.   This document attempts to answer the most commonly-asked questions on
  6.   the java-linux@java.blackdown.org mailing list. Its focus is the
  7.   Blackdown JDK. More information on running Java on Linux is available
  8.   at http://www.blackdown.org/java-linux.html.
  9.   ______________________________________________________________________
  10.  
  11.   Table of Contents:
  12.  
  13.   1.      Introduction to the Blackdown JDK and Mailing List User Guide
  14.  
  15.   1.1.    What is the Blackdown JDK?
  16.  
  17.   1.2.    Suggestions for List Participants
  18.  
  19.   1.3.    How can I get subscribed? Unsubscribed?
  20.  
  21.   1.4.    Where Can I Find Archived Postings from this List?
  22.  
  23.   2.      Could You Give Me An Overview of Running Java on Linux?
  24.  
  25.   2.1.    What is the Currently-supported Version of the Blackdown JDK?
  26.  
  27.   2.2.    What System Configuration do I Need to Run the JDK?
  28.  
  29.   2.3.    OK, Which Version of the JDK Should I Download?
  30.  
  31.   2.3.1.  JDK 1.02
  32.  
  33.   2.3.2.  JDK 1.1
  34.  
  35.   2.4.    What Are These Files?
  36.  
  37.   2.5.    What Other JDK Ports are Available for Linux?
  38.  
  39.   2.6.    There's a pure Java Package I Want to Run. Can I?
  40.  
  41.   2.7.    When is the JDK 1.2 Going to be Released for Linux?
  42.  
  43.   2.8.    Can I Take a Look at the JDK 1.2 Now Anyway?
  44.  
  45.   2.9.    Is Javasoft Going to Support Java on Linux?
  46.  
  47.   2.10.   What are Green Threads?
  48.  
  49.   2.11.   Is There a Native Threads Port of the Blackdown JDK?
  50.  
  51.   2.12.   Does Javasoft's Activator JVM work on Linux with Netscape?
  52.  
  53.   2.13.   Is there a JIT (Just in Time Compiler) for the Blackdown JDK?
  54.  
  55.   2.14.   What Other Java Resources are Available at Blackdown?
  56.  
  57.   2.15.   Other Sources of Information about Java on Linux
  58.  
  59.   3.      Blackdown JDK Installation Questions
  60.  
  61.   3.1.    Where to obtain JDK 1.02 and 1.1?
  62.  
  63.   3.2.    How Do I Install the JDK?
  64.  
  65.   4.      Troubleshooting the Blackdown JDK on Linux
  66.  
  67.   4.1.    Typical Questions to Ask Yourself When Debugging Problems
  68.  
  69.   4.2.    Where Can I Report Bugs?
  70.  
  71.   4.2.1.  What Should I Report?
  72.  
  73.   4.3.    Are There Any Debugging Techniques I Can Try Myself?
  74.  
  75.   4.4.    That Didn't Help. What Else Can I Do?
  76.  
  77.   5.      Details on Running The Blackdown JDK
  78.  
  79.   5.1.    I'm on <your favorite Linux distribution here> What Do I Need?
  80.  
  81.   5.1.1.  The glibc versus libc5 Problem
  82.  
  83.   5.1.2.  RedHat Installation Tips
  84.  
  85.   5.1.2.1.        RedHat RPM Availability
  86.  
  87.   5.1.2.2.        RedHat/RPM Environment Variable Issues
  88.  
  89.   5.1.3.  Debian
  90.  
  91.   5.1.4.  Slackware
  92.  
  93.   5.1.5.  Other Linux Distributions
  94.  
  95.   5.2.    Is There Anything Different About Native Interfaces on Linux?
  96.  
  97.   5.2.1.  Compiling Library Code for JNI
  98.  
  99.   5.3.    Is There a Problem with Green Threads and the JVM Invocation
  100.   API?
  101.  
  102.   5.3.1.  Green Threads and Wrapped System Services
  103.  
  104.   5.3.2.  Hacking Around the System Service Wrappers
  105.  
  106.   5.4.    Kaffe and the Blackdown JDK 1.1 are Installed. Neither Work!
  107.  
  108.   5.5.    I Have the Blackdown JDK 1.1.x and RMI is Giving Me Fits!
  109.  
  110.   5.6.    Help, I've Upgraded to ld.so-1.9.9 and Now the JDK Coredumps!
  111.  
  112.   5.7.    What's Wrong with Thread Priorities and the Console?
  113.  
  114.   5.8.    Help, Java Said it Ran out of Memory!
  115.  
  116.   5.9.    How Do I Add Swap Space?
  117.  
  118.   5.10.   Can I Display and Input Kanji with the Blackdown JDK?
  119.  
  120.   5.10.1. Library Issues
  121.  
  122.   5.10.1.1.       Libc5 Systems
  123.  
  124.   5.10.1.2.       Libc6 (glibc) Systems
  125.  
  126.   5.10.2. Entering Two Byte Kanji with XIM
  127.  
  128.   6.      Questions about Non-i386 Blackdown JDK Ports
  129.  
  130.   6.1.    What's the Status of the SPARC Port?
  131.  
  132.   6.2.    Is there an Alpha Port?
  133.  
  134.   6.3.    Is there a PowerPC Port?
  135.  
  136.   7.      General Questions about Java
  137.  
  138.   7.1.    Where Can I Learn More about Java?
  139.  
  140.   8.      General Questions about Linux
  141.  
  142.   8.1.    Where Can I Find Linux FAQs, Mailing Lists, and Documentation?
  143.  
  144.   8.2.    What is glibc, and Why Does it Matter?
  145.  
  146.   9.      Compiling the Blackdown JDK from Source
  147.  
  148.   9.1.    Can I Build Java Myself?
  149.  
  150.   9.2.    Could You Give Me a Pointer to Sun's Licensing Agreement?
  151.  
  152.   9.3.    How do I Build the JDK Now that I Have the Source?
  153.  
  154.   9.4.    What about Motif? Don't I Need That?
  155.  
  156.   9.5.    When I Build and Install, I Get Unsatisfied Link Errors at
  157.   Runtime!
  158.  
  159.   9.6.    Can I Try Builds of the Latest JDK Port in Development?
  160.  
  161.   10.     About the People Behind the Blackdown JDK
  162.  
  163.   10.1.   Who Ported the Blackdown JDK?
  164.  
  165.   10.2.   Who is Steve Byrne?
  166.  
  167.   10.3.   Who is Karl Asha?
  168.  
  169.   11.     Information on the Java-Linux FAQ Itself
  170.  
  171.   11.1.   Who Maintains the FAQ?
  172.  
  173.   11.2.   Where Can I Get a Copy of the FAQ?
  174.  
  175.   11.3.   Please Help the FAQ Maintainer!
  176.  
  177.   11.4.   Are there Any Plans for Automating the FAQ?
  178.  
  179.   11.5.   Caveat Emptor
  180.  
  181.   11.6.   Terms of Use
  182.  
  183.   11.7.   Acknowledgements
  184.   ______________________________________________________________________
  185.  
  186.   $Id: FAQ-java-linux.sgml,v 1.106 1998/09/12 20:24:00 stevemw Exp stevemw $
  187.  
  188.   1.  Introduction to the Blackdown JDK and Mailing List User Guide
  189.  
  190.   1.1.  What is the Blackdown JDK?
  191.  
  192.   The Blackdown JDK is one of the ports of Sun's Java Developer's
  193.   Toolkit to Linux. The JDK includes the basic tools needed for
  194.   developing and running Java applications, including (among other
  195.   things) the following:
  196.  
  197.   o  A Java Virtual Machine, or JVM. The virtual machine interprets and
  198.      executes Java byte codes (a more condensed, intermediate form for
  199.      Java instructions) inside a software-only machine. In other words,
  200.      the JVM emulates a hardware platform, including registers, program
  201.      counter, and so forth.
  202.  
  203.   o  A Java compiler, which takes a text file containing Java syntax and
  204.      transforms it into Java byte codes.
  205.  
  206.   o  An appletviewer for executing Java applet code.
  207.  
  208.   o  A Java debugger.
  209.  
  210.   o  Example Java programs.
  211.  
  212.   o  The Java 1.1 class library, including platform-independent library
  213.      source.
  214.  
  215.   o  A tool for creating and managing Java security keys.
  216.  
  217.   o  A remote method stub and skeleton generator.
  218.  
  219.   o  A registry server for remote method invocations.
  220.  
  221.   o  C and C++ headers for extending the JVM with interfaces to native
  222.      code.
  223.  
  224.   o  Native libraries for the platform-dependent portions of the JVM,
  225.      including AWT layer above Motif and X11.
  226.  
  227.   o  Native libraries for embedding a JVM in other native applications.
  228.  
  229.      There are static and dynamic versions of the core Java binaries, as
  230.      well as versions compiled with and without debugging symbols.
  231.      Documentation for the JDK APIs is available separately from
  232.      Javasoft at http://www.javasoft.com/docs/.
  233.  
  234.   For information on the Blackdown JDK porting project itself, including
  235.   who the major contributors have been, please see section ``Who Ported
  236.   the Blackdown JDK?'' .
  237.  
  238.   1.2.  Suggestions for List Participants
  239.  
  240.   o  Please read http://www.place.org/~stevemw/java/FAQ/README.linux
  241.      (also found in the Blackdown JDK distribution).
  242.  
  243.   o  Choose a descriptive Subject: line for your mail.
  244.  
  245.   o  When reporting problems, please follow the guidelines in section
  246.      ``What Should I Report?''.
  247.  
  248.   o  Posts with lines wrapped at 75-80 characters are easier to read!
  249.  
  250.   o  Spamming the list or using members' E-mail addresses for commercial
  251.      purposes is forbidden.
  252.  
  253.   o  Some list users may ignore messages created in HTML or that include
  254.      proprietary attachments.
  255.  
  256.   o  Do not followup improper postings to the entire list; copy only the
  257.      sender and karl@blackdown.org, the list administrator.
  258.  
  259.   o  Please avoid inflammatory language.
  260.  
  261.   1.3.  How can I get subscribed? Unsubscribed?
  262.  
  263.   Please don't send E-mail directly to the list requesting these status
  264.   changes! Visit http://www.blackdown.org/java-linux.html and follow the
  265.   links to instructions or use the links provided in the next paragraph.
  266.  
  267.   The following URL would work in Netscape Mail to subscribe you: java-
  268.   linux-request@java.blackdown.org?subject=subscribe
  269.  
  270.   And this should unsubscribe: java-linux-
  271.   request@java.blackdown.org?subject=unsubscribe
  272.  
  273.   1.4.  Where Can I Find Archived Postings from this List?
  274.  
  275.   Karl Asha has arranged for the list to be archived here:
  276.   http://www.mail-archive.com/java-linux@java.blackdown.org/.
  277.  
  278.   2.  Could You Give Me An Overview of Running Java on Linux?
  279.  
  280.   Running Java on Linux is about what you'd expect. You should be able
  281.   to run most "pure Java" applications on the Linux JDK or JRE. It does
  282.   take a little longer to get the latest JDK on a target that Javasoft
  283.   doesn't officially support. Also, the JVM currently only uses green
  284.   threads. See section ``What are Green Threads?''.
  285.  
  286.   2.1.
  287.  
  288.   What is the Currently-supported Version of the Blackdown JDK?
  289.  
  290.   At the time of this writing, the latest supported Blackdown JDK
  291.   version is 1.1.6v2. Please see section ``Where to obtain JDK 1.02 and
  292.   1.1?''  for places to download. To determine your version, use this
  293.   command:
  294.  
  295.   ______________________________________________________________________
  296.   $ java -version
  297.   ______________________________________________________________________
  298.  
  299.   2.2.  What System Configuration do I Need to Run the JDK?
  300.  
  301.   This is only a basic summary. The Alpha, SPARC, and PPC platforms may
  302.   have different requirements, for example.
  303.  
  304.   1. A supported platform running regular, 32-bit Linux is required. See
  305.      section ``OK, Which Version of the JDK Should I Download?'' for
  306.      details.
  307.  
  308.   2. You need at a minimum, 20MB of free virtual memory to run the JDK.
  309.      See section ``How Do I Add Swap Space?'' for more information.
  310.  
  311.   3. Including HTML documentation and i18n.jar, JDK 1.1.6 i386 glibc
  312.      version takes 34MB of free space. You can make it smaller by
  313.      removing these and the demos.
  314.  
  315.   4. To run AWT, you'll need X11 up and running.
  316.  
  317.   5. Sound cards are supported but not required.
  318.  
  319.   2.3.  OK, Which Version of the JDK Should I Download?
  320.  
  321.   This section closely matches the organization of the Blackdown
  322.   distribution mirror hierarchy. This part of the FAQ is rather thin on
  323.   details at the moment, but it should help you to see which archive to
  324.   retrieve. You may also be interested in reading section ``What System
  325.   Configuration do I Need to Run the JDK?'' above.  After reading this,
  326.   if you're still wondering which individual archive to download, please
  327.   see ``What Are These Files?'' below.
  328.  
  329.   2.3.1.  JDK 1.02
  330.  
  331.   The Blackdown version of the JDK is only supported on Intel. If you
  332.   know of other Linux platforms to which the JDK has been ported, please
  333.   tell the FAQ maintainer. Look for the mirror closest to you by
  334.   following instructions in section ``Where to obtain JDK 1.02 and
  335.   1.1?''.
  336.  
  337.   2.3.2.  JDK 1.1
  338.  
  339.   o  Alpha
  340.       ................................ alpha/
  341.  
  342.   o  Intel x86
  343.       ................................ i386/
  344.  
  345.   o  SPARC
  346.       ................................ sparclinux/
  347.  
  348.   o  PowerPC
  349.       ................................ mklinux/
  350.  
  351.   o  Patches to Javasoft Source, etc...
  352.       ................................ common/
  353.  
  354.      You may wish to read section ``What is glibc, and Why Does it
  355.      Matter?''  to help you understand which Intel JDK to download.  To
  356.      just run the JDK, you don't need anything out of common/.  Those
  357.      diff(1) files are for people who want to request free access to the
  358.      SPARC/x86 Solaris and i386 Win32 sources from Sun and help with the
  359.      port. See section ``Compiling the Blackdown JDK from Source'' for
  360.      more information.
  361.  
  362.   2.4.  What Are These Files?
  363.  
  364.   By now, many readers are still wondering what each archive in the
  365.   mirror directories is. Below is a representation of what your favorite
  366.   web browser would have displayed if you were visiting a Blackdown JDK
  367.   mirror recently.
  368.  
  369.   ______________________________________________________________________
  370.   Current directory is /pub/java/JDK-1.1.6/i386/glibc/v2
  371.  
  372.   Up to higher level directory
  373.     i18n1.1.6-v2-glibc.tar.gz  2485 Kb    Fri Jun 19 21:56:00 1998...
  374.     jdk1.1.6-v2-glibc.tar.gz  11734 Kb    Fri Jun 19 21:56:00 1998...
  375.     jre1.1.6-v2-glibc.tar.gz   6089 Kb    Fri Jun 19 21:56:00 1998...
  376.     rt1.1.6-v2-glibc.tar.gz    3603 Kb    Fri Jun 19 21:56:00 1998...
  377.   ______________________________________________________________________
  378.  
  379.   At this point, you've already decided that your system is based on
  380.   glibc (perhaps by reading ``What is glibc, and Why Does it Matter?'').
  381.   Now you'd like to know what these four files do for you, and which
  382.   ones you should download.
  383.   1. jdk. The JDK contains everything you need to run Java, compile
  384.      Java, and debug java. It doesn't contain the international
  385.      character converters (see i18n).
  386.  
  387.   2. jre. The JRE is the Java runtime environment, including the
  388.      international character converters.
  389.  
  390.   3. rt. The Java RT is the minimal configuration you can have to run
  391.      Java. It doesn't contain any internationalization support.
  392.  
  393.   4. i18n. This contains font mappings and a JAR file containing the
  394.      international character converters, and really doesn't need to be
  395.      split off by library type, but is anyway.
  396.  
  397.   2.5.  What Other JDK Ports are Available for Linux?
  398.  
  399.   Please see section ``Questions about Non-i386 Blackdown JDK Ports''
  400.   for more information.  http://www.blackdown.org/java-linux/ports.html.
  401.  
  402.   2.6.  There's a pure Java Package I Want to Run. Can I?
  403.  
  404.   Most likely. For example, I've tested Javasoft's JFC SwingSet (see
  405.   http://java.sun.com/products/jfc/) with a static Motif build and a
  406.   Lesstif build with good results.
  407.  
  408.   This typically involves downloading the package and untarring or
  409.   unzipping it. Sometimes the vendor won't provide an installation
  410.   procedure that works well on Linux, and so you have to adjust a script
  411.   or do it by hand.
  412.  
  413.   2.7.  When is the JDK 1.2 Going to be Released for Linux?
  414.  
  415.   According to Steve Byrne on Monday, May 26th 1998:
  416.  
  417.        JavaSoft is trying very hard to get a license set up with an
  418.        external person to coordinate the 1.2 Linux porting effort.
  419.        The plan is not to have to wait until 1.2 ships, but to get
  420.        things underway much sooner (1.2 is huge, and involves lots
  421.        more machine specific components, and will take a while to
  422.        port).
  423.  
  424.   2.8.  Can I Take a Look at the JDK 1.2 Now Anyway?
  425.  
  426.   Yes, just run unzip on the Solaris shell script archive; it'll unpack
  427.   it for you. You can then unpack the src.zip archive. Also, you can
  428.   already get the documentation from Javasoft from
  429.   http://www.javasoft.com/docs/index.html.
  430.  
  431.   2.9.  Is Javasoft Going to Support Java on Linux?
  432.  
  433.   We don't know yet. At the time of this writing, bug 4097810 was at the
  434.   top of the JDC Bug Parade. You can read about it at:
  435.   http://developer.java.sun.com/developer/bugParade/bugs/4097810.html.
  436.  
  437.   There are a number of complex issues involved with this request,
  438.   including the wide variety of Linux distributions, target
  439.   architectures (beyond Intel where Javasoft already supports Solaris
  440.   x86), the huge number of announced APIs with required native support,
  441.   and so forth.
  442.  
  443.   2.10.  What are Green Threads?
  444.  
  445.   Green threads use some magic with jmp_bufs, stack pointers, the
  446.   program counter, and some other hocus pocus to schedule different
  447.   instruction streams. This gives the practical effect of multi-
  448.   threading with some caveats about signals and how they're handled
  449.   across longjmp()s. See the discussion of native threads in section
  450.   ``Is There a Native Threads Port of the Blackdown JDK?''.
  451.  
  452.   Jon Waette <hplus@zilker.net>, has a brief synopsis of green threads
  453.   at http://www.zilker.net/~hplus/jvm.html. He states:
  454.  
  455.        Sun's Java VM as running on Solaris [without the native
  456.        threads package] used a user-level thread package named
  457.        Green Threads.  This is strictly a collaborative threading
  458.        package; the JVM is one system process and only executes one
  459.        Java code stream at a time.
  460.  
  461.        This is convenient for implementors, because special
  462.        operations that required nobody else to touch sensitive data
  463.        are intrinsically protected. As long as you don't relinquish
  464.        the CPU (and block signals) you're in no danger.
  465.  
  466.        If you do a [System.in.readLine()], the JVM will sit in the
  467.        blocking input call until input is available; nothing else
  468.        will happen in your program.
  469.  
  470.   If anyone has a clearer explanation of this than the FAQ maintainer's,
  471.   please contribute.
  472.  
  473.   2.11.  Is There a Native Threads Port of the Blackdown JDK?
  474.  
  475.   Not at this time. Karl Asha has this to say:
  476.  
  477.        Native threading in the jdk is partially a dream. There's a
  478.        lot of problems with linux's pthreads implementation for
  479.        starters, and second it'll take a reasonable effort to get
  480.        them into the jdk itself.
  481.  
  482.   2.12.  Does Javasoft's Activator JVM work on Linux with Netscape?
  483.  
  484.   Take a look at http://www.blackdown.org/activator/.
  485.  
  486.   2.13.  Is there a JIT (Just in Time Compiler) for the Blackdown JDK?
  487.  
  488.   There are several. Please take a look at
  489.   http://www.blackdown.org/java-linux/javatools.html for pointers.
  490.  
  491.   Alexander Davydenko <alex@Javad.Ru> posted an updated configure script
  492.   to install TYA that this author hasn't tested. You can read his post
  493.   at http://www.mail-archive.com/java-
  494.   linux@java.blackdown.org/msg00126.html
  495.  
  496.   2.14.  What Other Java Resources are Available at Blackdown?
  497.  
  498.   Karl Asha's Blackdown server, http://www.blackdown.org/java-
  499.   linux.html, has a number of resources. Among other things, Karl
  500.   provides the following pointers:
  501.  
  502.   o  Recent news about running Java on Linux:
  503.      http://www.blackdown.org/java-linux/info.html
  504.  
  505.   o  Javasoft-supplied products: http://www.blackdown.org/java-
  506.      linux/products.html
  507.   o  The Blackdown port of the Java Activator Plugin for Netscape:
  508.      http://www.blackdown.org/activator/
  509.  
  510.   o  Java Tools: http://www.blackdown.org/java-linux/javatools.html
  511.  
  512.   o  Information about Third-party Java products running on Linux:
  513.      http://www.blackdown.org/java-linux/otherproducts.html
  514.  
  515.   2.15.  Other Sources of Information about Java on Linux
  516.  
  517.   o  Luiz Otavio Lautenschlaeger Zorzella has a general "Java on Linux
  518.      FAQ" at http://nr.conexware.com/~zorzella/wine/FAQ2.htm
  519.  
  520.   o  Paul Cho has an up-to-date Linux/Java page worth reading often:
  521.      http://www.w3com.com/paulcho/javalinux/
  522.  
  523.   o  Professor Sergey Nitikin's Linux/Java News:
  524.      http://www.public.asu.edu/~nikitin/JavaOnline/
  525.  
  526.   3.  Blackdown JDK Installation Questions
  527.  
  528.   3.1.  Where to obtain JDK 1.02 and 1.1?
  529.  
  530.   Please visit http://www.blackdown.org/java-linux/mirrors.html and
  531.   select the site nearest you. Both Randy Chapman's JDK 1.02 and Steve
  532.   Byrne's JDK 1.1.x are found on participating mirror sites. Check
  533.   section ``What is the Currently-supported Version of the Blackdown
  534.   JDK?''  for the currently supported version the Blackdown JDK.
  535.  
  536.   3.2.  How Do I Install the JDK?
  537.  
  538.   1. Download the tar(1) archive for your platform as directed by the
  539.      mirror list mentioned in section ``Where to obtain JDK 1.02 and
  540.      1.1?''.
  541.  
  542.   2. Move to an appropriate directory and for example, unpack the tar(1)
  543.      archive as follows:
  544.  
  545.      ___________________________________________________________________
  546.      $ cd /usr/local
  547.      $ tar zxvf /tmp/jdk1.1.6.tar.gz
  548.      ___________________________________________________________________
  549.  
  550.   3. Make sure your DISPLAY environment variable is set, put the
  551.      resulting directory into your execution path, and try something:
  552.  
  553.      ___________________________________________________________________
  554.      $ export DISPLAY=:0
  555.      $ export PATH=/usr/local/jdk1.1.6/bin:$PATH
  556.      $ appletviewer \
  557.          /usr/local/jdk1.1.6/demo/awt-1.1/lightweight/OpenlookButtons/example.html
  558.      ___________________________________________________________________
  559.  
  560.   Note that the above examples assumed you were using the Bash shell,
  561.   such as /bin/bash. Also note that if you already have a CLASSPATH set,
  562.   you'll probably want to append .:/usr/local/jdk1.1.6/lib/classes.zip:
  563.   to that environment variable.  This ensures that you have the current
  564.   working-directory in your class search path, and makes things much
  565.   easier for you as you test your code.
  566.  
  567.   Of course you may want to add these environment commands to your
  568.   shell's startup script, such as $HOME/.bashrc.
  569.  
  570.   Some people may wish to set JAVA_HOME themselves. That way, you can
  571.   change all commands following setting that to use it instead, such as
  572.  
  573.   ______________________________________________________________________
  574.   $ export JAVA_HOME=/usr/local/jdk1.1.6
  575.   $ export PATH=$JAVA_HOME/bin:$PATH
  576.   $ export CLASSPATH=.:$JAVA_HOME/lib/classes.zip
  577.   ______________________________________________________________________
  578.  
  579.   4.  Troubleshooting the Blackdown JDK on Linux
  580.  
  581.   4.1.  Typical Questions to Ask Yourself When Debugging Problems
  582.  
  583.   o  Does your system hardware and software satisfy the minimum
  584.      requirements? See section ``What System Configuration do I Need to
  585.      Run the JDK?''.
  586.  
  587.   o  Are you running the current version?  You can find that information
  588.      in section ``What is the Currently-supported Version of the
  589.      Blackdown JDK?''.
  590.  
  591.   o  Have you checked to see if your libc, glibc, and X11 libraries
  592.      could be the problem? See section ``Details on Running The
  593.      Blackdown JDK''.  If you learn something we can add to there,
  594.      please post them!
  595.  
  596.   o  Environment Variables.
  597.  
  598.      Here are the top candidates for problems:
  599.  
  600.   o  CLASSPATH
  601.      Should either be unset or start with .:$JAVA_HOME/lib/classes.zip.
  602.  
  603.   o  PATH
  604.      Should include $JAVA_HOME/bin -- ahead of /usr/bin where Kaffe
  605.      often lives, please!
  606.  
  607.   o  JAVA_HOME
  608.      This should be set to your top-level JDK directory.
  609.  
  610.   o  JDK_HOME
  611.      Although the JDK doesn't need this, it ought to be set to your top-
  612.      level JDK directory (if at all). HotJava uses this environment
  613.      variable, as do other packages other than the JDK.
  614.  
  615.   o  Are all the required X11 fonts installed?
  616.      This is a subtle area of concern. People have experienced crashes
  617.      from not having 75dpi fonts installed.
  618.  
  619.   o  Are your font and localization properties correct?
  620.      Another area that is difficult to troubleshoot. I hope to add more
  621.      information here soon!
  622.  
  623.   4.2.  Where Can I Report Bugs?
  624.  
  625.   Karl Asha has setup a Jitterbug problem-report form at
  626.   http://www.blackdown.org/cgi-bin/jdk. Please report problems by
  627.   filling this in as best you can. There are some guidelines for this in
  628.   section ``What Should I Report?''.
  629.  
  630.   Before submitting a bug, you may be able to help by visiting
  631.   Javasoft's Bug Parade at
  632.   http://developer.java.sun.com/developer/bugParade/bugs/ and checking
  633.   for related problems. If you mention a bug from a JDC bug ID in your
  634.   problem report, it can help Blackdown JDK developers.  At this time,
  635.   you will have to join the JDC in order to search this database.
  636.  
  637.   As usual, feel free to open a discussion about your problems on the
  638.   java-linux@java.blackdown.org mailing list.
  639.  
  640.   4.2.1.
  641.  
  642.   What Should I Report?
  643.  
  644.   Although it may not seem so, solving Linux JDK problems can sometimes
  645.   be difficult because of the large variation of systems that are in
  646.   use. Please do your best when reporting a bug to tell us all about
  647.   your system, the code you're running, and anything else that can help.
  648.   Here's a checklist of items to mention.
  649.  
  650.   1. A careful synopsis of the problem.
  651.  
  652.   2. Which JDK you're using. Type java -version to see.
  653.  
  654.   3. Your Linux distribution (i.e. RedHat) and its version.
  655.  
  656.   4. The LibC version you're using. Type ldconfig -D 2>&1 | grep libc |
  657.      tail -1 to see.
  658.  
  659.   5. The loader you're running. Type ldconfig -D 2>&1 | grep ld | tail
  660.      -1 to see.
  661.  
  662.   6. XFree86 Version. Type xdpyinfo | grep 'release number' to see.
  663.  
  664.   7. The version of the Linux kernel you're running. Type uname -r to
  665.      see.
  666.  
  667.   8. JDC BugID if you've found one.
  668.  
  669.   9. A URL where with some related Java code or binary data.
  670.  
  671.   10.
  672.      Your assessment of the problem's priority.
  673.  
  674.   4.3.  Are There Any Debugging Techniques I Can Try Myself?
  675.  
  676.   Try running the JDK java, appletviewer, and javac wrapper scripts like
  677.   this:
  678.  
  679.   ______________________________________________________________________
  680.   $ sh -x $JAVA_HOME/bin/java -verbose -verbosegc -cs -verify ...
  681.   ______________________________________________________________________
  682.  
  683.   or this:
  684.  
  685.   ______________________________________________________________________
  686.   $ strace -f -s 256 $JAVA_HOME/bin/java ...
  687.   ______________________________________________________________________
  688.  
  689.   That last command will be very noisy, but you may be surprised what
  690.   you learn from reading it.
  691.  
  692.   4.4.
  693.  
  694.   That Didn't Help. What Else Can I Do?
  695.  
  696.   We've created a troubleshooting information collection script that you
  697.   can download from http://www.place.org/~stevemw/java/FAQ/java-linux-
  698.   info.sh and follow the instructions at the top of it. Mail its output
  699.   to stevemw@place.org.
  700.  
  701.   5.
  702.  
  703.   Details on Running The Blackdown JDK
  704.  
  705.   5.1.  I'm on <your favorite Linux distribution here> What Do I Need?
  706.  
  707.   5.1.1.  The glibc versus libc5 Problem
  708.  
  709.   The latest versions of the Blackdown JDK have their own built-in
  710.   loader (libdl.so) and libc.so, which will hopefully make them more
  711.   robust in most cases. Older versions of the JDK 1.1.5 (especially) are
  712.   much more sensitive. Take a look in $JAVA_HOME/i386/green_threads/ to
  713.   see these files.  (You may remove them if you feel they are a source
  714.   of trouble to you.)  Karl Asha maintains a list of JDK-related library
  715.   issues at: http://www.blackdown.org/java-linux/docs/libraries.html.
  716.   In short, you need glibc-2.0.7 and glibc-devel-2.0.7 or higher on a
  717.   glibc-based system such as RedHat 5.0 or Debian 2.0.  There are RPMs
  718.   for these on RedHat Intel systems at
  719.   ftp://ftp.redhat.com/pub/redhat/current/updates/i386.
  720.  
  721.   For a libc5 system, you need libc.so.5.44 or greater, along with a
  722.   recent libdl.so. You can find these at
  723.   ftp://tsx-11.mit.edu/pub/linux/packages/GCC.
  724.  
  725.   For an in-depth discussion of this issue, see section ``What is glibc,
  726.   and Why Does it Matter?''.
  727.  
  728.   5.1.2.  RedHat Installation Tips
  729.  
  730.   Download the glibc and ld updates described under
  731.   http://www.redhat.com/support/docs/errata.html.
  732.  
  733.   5.1.2.1.  RedHat RPM Availability
  734.  
  735.   According to Sorin Lingureanu <sorin@tuiasi.ro>, JDK RPMs are to be
  736.   found in ftp://ftp.redhat.com/pub/contrib.  Levente Farkas has more
  737.   information about running the Blackdown JDK on RedHat here:
  738.   http://anna.inf.u-szeged.hu/java/java-rpm.html.
  739.  
  740.   5.1.2.2.  RedHat/RPM Environment Variable Issues
  741.  
  742.   In addition to the general problems described in section ``Environment
  743.   Variables'', make sure that you don't have conflicting JDK_HOME,
  744.   JAVA_HOME, and CLASSPATH environment variables set from scripts
  745.   sourced from /etc/profile.d/ at login. This can especially be a
  746.   problem when trying multiple versions of the JDK in succession.
  747.  
  748.   5.1.3.  Debian
  749.  
  750.   Paul Reavis <preavis@partnersoft.com> has an excellent page with
  751.   details at http://www.partnersoft.com/~reavis/java/Debian-JDK.html.
  752.  
  753.   5.1.4.  Slackware
  754.  
  755.   In JDK versions 1.1.5 through 1.1.6v2 we've seen a problem with
  756.   libc.so and libdl.so shipped with the JDK in
  757.   $JAVA_HOME/lib/i386/green_threads conflicting with the system. Try
  758.   removing these and then running Java.
  759.  
  760.   Please help by posting your experiences with the Blackdown JDK on
  761.   Slackware.
  762.  
  763.   5.1.5.  Other Linux Distributions
  764.  
  765.   Check with http://nr.conexware.com/~zorzella/wine/FAQ2.htm to see if
  766.   Luiz Otavio Lautenschlaeger Zorzella has additional information that
  767.   applies to your platform.
  768.  
  769.   You're welcome to contribute what you know to the FAQ.
  770.  
  771.   5.2.  Is There Anything Different About Native Interfaces on Linux?
  772.  
  773.   Not really. The compilation flags may need to be different from what
  774.   Javasoft recommends in the Solaris-oriented documentation. Also, there
  775.   is a known problem with all green threads implementations and the JVM
  776.   Invocation API, discussed in section ``Is There a Problem with Green
  777.   Threads and the JVM Invocation API?''.
  778.  
  779.   There have been reports of problems with C++ IOStreams using
  780.   libstdc++-2.7.x. Note that g++-2.8.1 and libstdc++-2.8.1 have been
  781.   tested, and seem to work fine for several users on RedHat 5.0.
  782.  
  783.   5.2.1.  Compiling Library Code for JNI
  784.  
  785.   Ed Roskos <roskos@bellatlantic.net> gives us these instructions for C
  786.   JNI:
  787.  
  788.        I've written a few shared libraries for use under both Linux
  789.        and Solaris, and since a few people are curious about this,
  790.        here goes:
  791.  
  792.        1. Make sure you have run javah. Plenty of documentation on
  793.           this exists.
  794.  
  795.        2. You must first compile your C source files to object
  796.           files, which end in ".o". Example:
  797.            gcc -fPIC -c -I<java-header-path> file1.c -o file1.o
  798.           You must replace <java-header-path> with the path to the
  799.           include files for java-linux.
  800.  
  801.        3. Create your library. This is not the same as creating an
  802.           executable.  Under Linux, use:
  803.           ld -shared file1.o -o libMyLib.so
  804.           If you have more than file1.o, just list them after
  805.           file1.o.
  806.  
  807.        You can then, from Java, load your library as
  808.        System.loadLibrary("MyLib");
  809.  
  810.        Hope this helps.
  811.  
  812.        Ed Roskos roskos@bellatlantic.net
  813.  
  814.   And  Duncan Roe <dunc@dimstar.cvsi.com> points us to the Texinfo docu-
  815.   mentation for GNU C, and argues that -fPIC only makes a difference on
  816.   the m68k, m88k and the Sparc.  Evidently -fpic works in some cases
  817.   (ELF?) on x86.
  818.  
  819.   5.3.  Is There a Problem with Green Threads and the JVM Invocation
  820.   API?
  821.  
  822.   Yes, there's a known problem with Javasoft's user-level threads
  823.   package (called green threads) and the Invocation API because of the
  824.   way it wraps system calls. See section ``What are Green Threads?'' for
  825.   more information on green threads.
  826.  
  827.   5.3.1.  Green Threads and Wrapped System Services
  828.  
  829.   Uncle George, Juergen Kreileder, and Bernd Kreimeier have encountered
  830.   this problem, and through their discussion of it we have this list of
  831.   references to consult for more information:
  832.  
  833.   o  JDC Bug Parade bug ID at
  834.      http://developer.java.sun.com/developer/bugParade/bugs/4040743.html
  835.  
  836.   o  The Java Tutorial under "Invoking the Java Virtual Machine" at
  837.      http://java.sun.com/docs/books/tutorial/native1.1/implementing/
  838.  
  839.   o  Rob Gordon's excellent Essential JNI published in 1998 by Prentice
  840.      Hall PTR, ISBN 0-13-679895-0
  841.  
  842.      Gordon suggests in Essential JNI on page 260 that:
  843.  
  844.        When building a Java-enabled application on Solaris and
  845.        linking against the green threads version of libjava.so, you
  846.        must defer system calls until after the call to JNI_Create-
  847.        JavaVM. This is because the user-level threads package in
  848.        libjava.so (green threads) defines its own system calls . .
  849.        .
  850.  
  851.   And the JDK 1.1 Tutorial suggests that, "The first step toward getting
  852.   this to work is always to link libjava.so into the executable *first*,
  853.   even before libc.so . . ."
  854.  
  855.   5.3.2.  Hacking Around the System Service Wrappers
  856.  
  857.   On June 21, 1998 Uncle George posted these paraphrased comments:
  858.  
  859.        Actually, library calls are overridden, not system-calls. If
  860.        you are savvy enough, you can call the system service your-
  861.        self, and forget the library interface (i.e. instead of
  862.        using select, try __select). But in doing so, the green
  863.        threading . . . can be compromised, i.e. other threads won't
  864.        be runnable until that service completes.
  865.  
  866.        The malloc()/free() bogus pointer messages are problems in
  867.        trying to free a pointer twice, of which some "MALLOC"
  868.        packages get terminally upset with . . .
  869.  
  870.   You may also be interested in the discussion of native threads in
  871.   section ``Is There a Native Threads Port of the Blackdown JDK?''.
  872.  
  873.   5.4.  Kaffe and the Blackdown JDK 1.1 are Installed. Neither Work!
  874.  
  875.   After running
  876.  
  877.   javac HelloWorld.java
  878.  
  879.   and seeing this message:
  880.  
  881.   Failed to open object 'HelloWorld/java'
  882.  
  883.   Other people have reported error messages such as these:
  884.  
  885.   $ javac
  886.   Failed to locate native library in path:
  887.           /usr/lib
  888.   Aborting.
  889.  
  890.   Daniele Lugli <danlugli@tin.it> reports:
  891.  
  892.    ...The javac which was giving the problem was /usr/bin/javac,
  893.   that is the kaffe javac. Now that I moved $JAVA_HOME/bin
  894.   ahead in my $PATH, both javac and java work, and I see a
  895.   wonderful "Hello, World!".
  896.  
  897.   In other words, always check for conflicting environment variable
  898.   problems.  For details on how to do this, see section ``Environment
  899.   Variables''.
  900.  
  901.   A very common cause for problems with Kaffe is having /usr/bin in your
  902.   path ahead of $JAVA_HOME/bin.
  903.  
  904.   5.5.  I Have the Blackdown JDK 1.1.x and RMI is Giving Me Fits!
  905.  
  906.   Rich McClellan <richmc@entropy.ucsc.edu> reports that running the
  907.   Blackdown JDK 1.1.5v7libc works better than the glibc version, and
  908.   forwards this advice from Alexander V. Konstantinou
  909.   <akonstan@cs.columbia.edu>:
  910.  
  911.   The problem is related to naming in /etc/hosts. This is a
  912.   known Java problem in picking up the right name for the
  913.   interface. Change the localhost name to your real machine
  914.   name. This may cause problems with talk though ...
  915.  
  916.   5.6.  Help, I've Upgraded to ld.so-1.9.9 and Now the JDK Coredumps!
  917.  
  918.   Slackware users have found that removing the libdl.so.*  and libc.so.*
  919.   files from $JAVA_HOME/lib/i386/green_threads takes care of this
  920.   problem. We don't know what causes it yet, though.
  921.  
  922.   5.7.  What's Wrong with Thread Priorities and the Console?
  923.  
  924.   You may be asking yourself this question if you share access to
  925.   System.out or System.in among several threads.  Jason Gilbert
  926.   <jason@scott.net> has a reply to this question:
  927.  
  928.   Bernd Kreimeier wrote:
  929.   >
  930.   > Is there a problem with several threads using System.out
  931.   > at the same time? A JDK problem? Or a Linux JDK problem?
  932.  
  933.   I believe it's a green threads JDK problem.
  934.  
  935.   jason
  936.  
  937.   --
  938.   Jason Gilbert | http://www.scott.net/~jason/
  939.                 | http://www.homewood.net
  940.  
  941.   For a discussion of green threads, read section ``What are Green
  942.   Threads?''.
  943.  
  944.   5.8.  Help, Java Said it Ran out of Memory!
  945.  
  946.   You have two strong candidates as causes for this problem.
  947.  
  948.   1. Your program needs more than the default that the JVM allows.
  949.      Memory limits can be set like this: java -ms16m -mx64m ....  From
  950.      the JDK documentation:
  951.  
  952.      -ms<number>       set the initial Java heap size
  953.      -mx<number>       set the maximum Java heap size
  954.  
  955.   2. You actually don't have enough virtual memory (the total of
  956.      physical RAM and swap space) available. The free command can help
  957.      you there. See the manual page for free(1). For the current minimum
  958.      system requirements, see the discussion of them in section ``What
  959.      System Configuration do I Need to Run the JDK?''.
  960.  
  961.   5.9.  How Do I Add Swap Space?
  962.  
  963.   See the manual pages for swapon(8) and mkswap(8).
  964.  
  965.   5.10.  Can I Display and Input Kanji with the Blackdown JDK?
  966.  
  967.   In addition to the information found here, you will certainly
  968.   appreciate Dan Kegel's page, Fonts and Internationalization in Java
  969.   found at http://www.alumni.caltech.edu/~dank/javafont.htm.  You are
  970.   encouraged to visit Javasoft's 1.1 discussion of this topic at
  971.   http://www.javasoft.com/products/jdk/1.1/docs/guide/intl/fontprop.html,
  972.   as well.
  973.  
  974.   Please be aware that these FAQ entries are extremely sketchy at the
  975.   moment. If you have additional information about making CJK (Chinese,
  976.   Japanese, and Korean) code work well with Java on Linux, please tell
  977.   the FAQ maintainer.
  978.  
  979.   5.10.1.  Library Issues
  980.  
  981.   The following entries also relate more to situations that arise when
  982.   you must settle on one set of libraries or the other, and you end up
  983.   without being able to run some application or another because of
  984.   unresolved symbols. Keep in mind that with their own builtin loader
  985.   and libc, recent versions of the JDK shouldn't cause you to change
  986.   your libraries at all.
  987.  
  988.   5.10.1.1.  Libc5 Systems
  989.  
  990.   Nozomi Matsumura <nmatsumu@can.bekkoame.ne.jp> has a suggestion that
  991.   at least applied to earlier, libc5 versions of the JDK, and may still
  992.   work. It involves making use of multi-byte character support provided
  993.   in builds of libX11.so with the Xsetlocale(3) call.
  994.  
  995.   Matsumura-san points us at this fix provided by Hiroshi Hisamatsu
  996.   <hisama2@asahi.email.ne.jp>, which is a small, shared library
  997.   (liblocale.so) to explicitly specify the Kanji locale. It is available
  998.   from http://www.asahi-net.or.jp/~nf6h-hsmt/jdk1.1.1-locale.tar.gz.
  999.  
  1000.   More detail on this is available in Japanese at http://www.asahi-
  1001.   net.or.jp/~nf6h-hsmt/java.html. The fix also involves adding the
  1002.   following lines to your .java_wrapper file in $JAVA_HOME/bin:
  1003.  
  1004.   ______________________________________________________________________
  1005.   LD_PRELOAD="$JAVA_HOME/lib/${ARCH}/${THREADS_TYPE}/liblocale.so"
  1006.   export LD_PRELOAD
  1007.   ______________________________________________________________________
  1008.  
  1009.   Matsumura-san also mentions changing the locale specified by your
  1010.   environment variable LANG to ja, and says that ja_JP.{EUC,ujis} did
  1011.   not work.
  1012.  
  1013.   5.10.1.2.  Libc6 (glibc) Systems
  1014.  
  1015.   In addition to the properties hacks mentioned above (see section
  1016.   ``Libc5 Systems''), the inverse of what liblocale.so does is probably
  1017.   possible on glibc-based systems, if there's a problem (with some other
  1018.   application) at all. You may be able to simulate Xsetlocale(3) by
  1019.   wrapping setlocale(3) with it. For example, libc5 versions of XFree86
  1020.   (see http://www.xfree86.org) handle locale with the Xsetlocale(3)
  1021.   call, but that changes under glibc to plain setlocale(3).  See the
  1022.   setlocale(3) manual page for more information.
  1023.  
  1024.   5.10.2.  Entering Two Byte Kanji with XIM
  1025.  
  1026.   On July 14th, 1998, Nozomi Matsumura <nmatsumu@can.bekkoame.ne.jp>
  1027.   also submitted this information acquired from Minori Takagaki
  1028.   <lennen@st.rim.or.jp>, who was able to input and display Kanji using
  1029.   TextComponent.
  1030.  
  1031.   Takagaki was able to input directly using kinput2(XIM) or by cut&paste
  1032.   in Java applications and in appletviewer.
  1033.  
  1034.   Takagaki's environment is:
  1035.  
  1036.   o  Slackware-3.4 + PJE-0.1(*1)
  1037.  
  1038.   o  Kernel: 2.0.34
  1039.  
  1040.   o  libc: 5.4.38
  1041.  
  1042.   o  jdk1.1.6-v1-libc5
  1043.  
  1044.      Takagaki said to use Japanese characters, you need to setup as
  1045.      described here:
  1046.  
  1047.   1. Install Red Hat Motif 2.1 and X-TT(*2)
  1048.  
  1049.   2. Modify font.properties.ja (to use X-TT fonts)
  1050.  
  1051.   3. Get liblocale.so (see the discussion of this above in ``Libc5
  1052.      Systems'')
  1053.  
  1054.   4. modify .java_wrapper
  1055.  
  1056.      ___________________________________________________________________
  1057.      export LD_PRELOAD=liblocale.so
  1058.      export LANG=ja
  1059.      export DYN_JAVA=1 # to use libXm.so.2 from RH Motif2.1
  1060.      ___________________________________________________________________
  1061.  
  1062.   5. If using appletviewer, modify
  1063.      $JAVA_HOME/bin/i686/green_threads/appletviewer to use the
  1064.      dynamically linked java binary.
  1065.  
  1066.      X-TT is free a X font server for using Japanese TrueType Fonts.
  1067.      See http://www.ryukyu.ad.jp/~shin/linux/x-tt/.
  1068.  
  1069.   But some probelms occur:
  1070.  
  1071.   1. The getText() function is O.K. but setText() is not.
  1072.  
  1073.   2. Mouse drag selection is not well. Strings with Japanese charcters
  1074.      using TextField/TextArea are not selected correctly.
  1075.  
  1076.   3. When a cursor moves in TextField, Japanese characters are often
  1077.      modified randomly.
  1078.  
  1079.   4. When Japanese charcters are input in TextAreas, display timing is
  1080.      very strange. But getText() works correctly. Example: to input
  1081.      'NIHONNGO abcdef' when keying 'ab', 'NI' shows; when keying 'cd',
  1082.      'HONN' shows, etc. . .
  1083.  
  1084.   6.  Questions about Non-i386 Blackdown JDK Ports
  1085.  
  1086.   This section attempts to provide some additional information about
  1087.   non-Intel versions of the Blackdown JDK. At this time, Karl Asha has a
  1088.   more complete catalog of the different platforms available at
  1089.   http://www.blackdown.org/java-linux/ports.html.  Help determining
  1090.   which JDK to download is available in section ``OK, Which Version of
  1091.   the JDK Should I Download?''.
  1092.  
  1093.   6.1.  What's the Status of the SPARC Port?
  1094.  
  1095.   On June 16, 1998 Johan Vos <johan@sesuadra.org> provided this summary
  1096.   of the current SPARC effort, which is based at
  1097.   http://sesuadra.org/~jdk/:
  1098.  
  1099.        Starting from JDK 1.1.5, the Intel and SPARC ports are based
  1100.        on the same code. The SPARC-specific issues are separated
  1101.        from the other linux-specific issues. Improvements and bug-
  1102.        fixes in the general source code can be implemented without
  1103.        having to re-implement the SPARC-specific code.  As a conse-
  1104.        quence, most problems and updates on the Intel-JDK also
  1105.        occur on the SPARC-JDK. I try to synchronize as much as pos-
  1106.        sible with Steve's ports -- although licensing problems
  1107.        caused the JDK 1.1.6v1 release for SPARC to be a few days
  1108.        after the Intel-release.
  1109.  
  1110.        For the differences between static and dynamic linked
  1111.        versions -- of the Motif library --, the same remarks as for
  1112.        the Intel-release hold.
  1113.  
  1114.        Up to now, there is no port for glibc-systems -- since I
  1115.        don't have a glibc-system. Most likely, this porting will be
  1116.        done in the near future.
  1117.  
  1118.   6.2.  Is there an Alpha Port?
  1119.  
  1120.   Yes. Please see http://www.blackdown.org/java-linux/ports.html for
  1121.   more information.
  1122.  
  1123.   6.3.  Is there a PowerPC Port?
  1124.  
  1125.   Yes. Please see http://www.blackdown.org/java-linux/ports.html for
  1126.   more information.
  1127.  
  1128.   7.  General Questions about Java
  1129.  
  1130.   7.1.  Where Can I Learn More about Java?
  1131.  
  1132.   Here are a nuber of excellent starting points.
  1133.  
  1134.   o  Elliotte Rusty Harold's comp.lang.java FAQ:
  1135.      http://sunsite.unc.edu/javafaq/javafaq.html
  1136.  
  1137.   o  The Java networking FAQ:
  1138.      http://www.io.com/~maus/JavaNetworkingFAQ.html
  1139.  
  1140.   o  Peter van der Linden's Java Programmer's FAQ:
  1141.      http://www.best.com/~pvdl/javafaq.html
  1142.  
  1143.   o  Javasoft's Developer Connection FAQ:
  1144.      http://developer.javasoft.com/developer/techDocs/faqs.html
  1145.  
  1146.   8.  General Questions about Linux
  1147.  
  1148.   8.1.  Where Can I Find Linux FAQs, Mailing Lists, and Documentation?
  1149.  
  1150.   Here's a list of good places to start:
  1151.  
  1152.   o  The Linuxdoc project: http://sunsite.unc.edu/LDP/.
  1153.  
  1154.   o  The main Linux website: http://www.linux.org/.
  1155.  
  1156.   o  Linux kernels and libraries: http://www.kernel.org/.
  1157.  
  1158.   8.2.  What is glibc, and Why Does it Matter?
  1159.  
  1160.   I'll explain what libc and glibc are in a bit, but first, let me say
  1161.   that the current Blackdown Linux JDK tries to avoid library
  1162.   incompatibilities by providing a dedicated dynamic loader and its own
  1163.   libc.so. And (I think) even before this change, the problem of "which
  1164.   of libc5 or glibc is needed" was theoretically only experienced on
  1165.   systems such as RedHat 5.0 and Debian 2.0 that had so rapidly moved to
  1166.   glibc. Other library conflicts are always bound to happen because of
  1167.   the variety of Linux versions and configurations there are.
  1168.  
  1169.   The UNIX "libc" is the core set of functions to which most utility and
  1170.   application code links. You can see references to libc in the intro(3)
  1171.   manual page. For your information, functions described in section two
  1172.   (see intro(2)) of the manual are all inside the kernel, whereas
  1173.   section three describes those which may be standard, but are stored in
  1174.   separate libraries. To view these pages, make sure your core manual
  1175.   pages are installed, and type man 3 intro, for example.
  1176.  
  1177.   In order to save disk space and memory, modern operating systems like
  1178.   Linux have taken to using "shared" libraries that don't move their
  1179.   contents into code which links to them during the build process.
  1180.   Although there is a /usr/lib/libc.a, most production code is linked to
  1181.   /usr/lib/libc.so, which is typically a link-editor script for
  1182.   selecting the actual libc.so (shared object) archive.
  1183.  
  1184.   In short, lots of programs on your system share code out of one or
  1185.   more files as they execute. To see what shared code an executable
  1186.   needs, there is an optional Linux utility named ldd(1). If it's on
  1187.   your system, you can type ldd PROGRAM to see its shared libraries.
  1188.  
  1189.   Here's an example:
  1190.  
  1191.   ______________________________________________________________________
  1192.   $ ldd /bin/ls
  1193.           libc.so.6 => /lib/libc.so.6 (0x40003000)
  1194.           /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
  1195.   ______________________________________________________________________
  1196.  
  1197.   The older (and still most common) Linux libc was known as "libc5." The
  1198.   GNU/Linux development community sought to improve on it by adding
  1199.   thread-safety where possible, 64-bit support, better POSIX and XPG4.2
  1200.   compliance, superior organization of the library sources, and multi-
  1201.   byte character locale support. These and other changes will bring even
  1202.   more robustness and quality to the Linux development environment.
  1203.   Although the changes are inconvenient to us sometimes, the end result
  1204.   should be worth it.
  1205.  
  1206.   The new library is now called "glibc" because it's a library common
  1207.   across Linux and HURD, and enjoys a broad base of GNU developer
  1208.   contributions. (I don't know how much of the earlier Linux libc
  1209.   software was derived from GNU libc, which has been around for quite a
  1210.   while on its own, I think.)
  1211.  
  1212.   For more information on GNU libc, see
  1213.   http://www.imaxx.net/~thrytis/glibc/.  Since C is central to the
  1214.   history and development of UNIX and Linux, you might enjoy the links
  1215.   found on http://www.dundee.ac.uk/~bmsimpso/work/C-Programming/ as
  1216.   well.
  1217.  
  1218.   9.  Compiling the Blackdown JDK from Source
  1219.  
  1220.   9.1.  Can I Build Java Myself?
  1221.  
  1222.   Building the JDK on Linux with patches supplied by Steve Byrne is
  1223.   fairly straightforward. See http://www.blackdown.org/~sbb for the
  1224.   diffs and some additional details.
  1225.  
  1226.   I encourage you to read README.linux.src from the patched source
  1227.   distribution if you plan to undertake this project. You will need to
  1228.   sign a license agreement with Javasoft in order to download the
  1229.   sources.
  1230.  
  1231.   See section ``Could You Give Me a Pointer to Sun's Licensing
  1232.   Agreement?''  below for details.
  1233.  
  1234.   9.2.
  1235.  
  1236.   Could You Give Me a Pointer to Sun's Licensing Agreement?
  1237.  
  1238.   In order to obtain the JDK sources, first you must read, sign, and FAX
  1239.   in an agreement with Sun. The agreement can be found at
  1240.   http://www.javasoft.com/nav/business/source_form.html.
  1241.  
  1242.   9.3.  How do I Build the JDK Now that I Have the Source?
  1243.  
  1244.   Please read the
  1245.   http://www.place.org/~stevemw/java/FAQ/README.linux.src file.
  1246.  
  1247.   9.4.  What about Motif? Don't I Need That?
  1248.  
  1249.   You can build the JDK against Lesstif, the Hungry Programmers' GNU
  1250.   copylefted implementation of the Motif API. For more information,
  1251.   visit their website at http://www.lesstif.org.  Make sure you get the
  1252.   "current" distribution. They are very responsive to accurate bug and
  1253.   problem reports.
  1254.  
  1255.   On the other hand, a number of Motif developer library vendors exist
  1256.   for Linux systems. I recommend you read the Motif comp.windows.x.motif
  1257.   news group FAQ. You can find it here:
  1258.   http://www.rahul.net/kenton/faqs/mfaq_index.html.
  1259.  
  1260.   9.5.  When I Build and Install, I Get Unsatisfied Link Errors at Run-
  1261.   time!
  1262.  
  1263.   Make sure you're building all the targets Steve Byrne suggests in
  1264.   http://www.place.org/~stevemw/java/FAQ/README.linux.src.  Here's an
  1265.   example:
  1266.  
  1267.   ______________________________________________________________________
  1268.   make DESTDIR="$ALT_JAVAHOME/jdk116v2b" RELEASE="MY-JDK1.1.6-V2B" \
  1269.           appletviewer jre_only 2>&1 | tee MakeOut-V2B1-BUILD-01
  1270.   ______________________________________________________________________
  1271.  
  1272.   In this example, I have ALT_JAVAHOME set to the javasrc/build, just
  1273.   above the genunix/ target directory. You should be able to set ALTMO-
  1274.   TIF_DIR to where you've installed Lesstif.
  1275.  
  1276.   Note: you ought to have ALT_BOOTDIR set to a running JDK 1.1, and I
  1277.   build with CLASSPATH and JAVA_HOME unset.
  1278.  
  1279.   9.6.  Can I Try Builds of the Latest JDK Port in Development?
  1280.  
  1281.   Please stay tuned to the mailing list for announcements.
  1282.  
  1283.   10.  About the People Behind the Blackdown JDK
  1284.  
  1285.   10.1.
  1286.  
  1287.   Who Ported the Blackdown JDK?
  1288.  
  1289.   Randy Chapman <chapman@wilbursoft.com> did the original port of the
  1290.   Solaris JDK 1.0 to Linux on the i386.
  1291.  
  1292.   Steve Byrne has done much of the work on the Intel port of 1.1.
  1293.  
  1294.   Quoting Steve Byrne from
  1295.   http://www.place.org/~stevemw/java/FAQ/README.linux
  1296.  
  1297.        Special thanks to Johan Vos (Sparc Linux port), Chris Sea-
  1298.        wood (GLIBC), Karl Asha (who gave us blackdown, thanks
  1299.        Karl!) Kevin Buettner, Scott Hutinger, Kevin Hendricks,
  1300.        Brian Keller, Philippe Laliberte and the rest of the PowerPC
  1301.        porting team -- these guys really fixed a *lot* of generic
  1302.        JDK bugs -- the 1.1.5 port is *much* better as a result of
  1303.        their hard work. Dan Powell and Rich Cannings have been very
  1304.        gracious to take over the administrative duties and to pro-
  1305.        vide a site (and domain name) dedicated to java-linux --
  1306.        thanks!
  1307.  
  1308.   And again:
  1309.  
  1310.        Neal Sanche fixed the thread creep bug.  Thanks, Neal!
  1311.  
  1312.   Please pass on historical information to the FAQ maintainer.
  1313.  
  1314.   10.2.  Who is Steve Byrne?
  1315.  
  1316.   Steve has some auto-biographical information on his web page at
  1317.   http://java.sun.com/people/sbb/index.html.
  1318.   10.3.  Who is Karl Asha?
  1319.  
  1320.   Karl has this response:
  1321.  
  1322.        Not too much to say...some time back in 1995 I wanted so
  1323.        much to have java on a linux box so I started harassing peo-
  1324.        ple I knew to work on it.  I put together the web site, the
  1325.        mailing lists, etc, helped out a little here and there with
  1326.        the port, and things just bloomed :)
  1327.  
  1328.   11.  Information on the Java-Linux FAQ Itself
  1329.  
  1330.   11.1.
  1331.  
  1332.   Who Maintains the FAQ?
  1333.  
  1334.   Stephen Wynne is the current FAQ maintainer. However, answers to
  1335.   questions found in this document are from a variety of participants on
  1336.   java-linux@java.blackdown.org.  If you have any comments,
  1337.   clarifications, or corrections, please send them to Stephen Wynne
  1338.   <stevemw@place.org>.  If you have something to add, please send E-mail
  1339.   to the list itself.
  1340.  
  1341.   11.2.  Where Can I Get a Copy of the FAQ?
  1342.  
  1343.   Most-recent copies of this FAQ can currently be found at
  1344.   http://www.place.org/~stevemw/java/FAQ/FAQ-java-linux.html.
  1345.  
  1346.   Here's the text version of this document:
  1347.   http://www.place.org/~stevemw/java/FAQ/FAQ-java-linux.txt.  The
  1348.   PostScript "letter" version:
  1349.   http://www.place.org/~stevemw/java/FAQ/FAQ-java-linux.ps.  The
  1350.   PostScript "A4" version: http://www.place.org/~stevemw/java/FAQ/FAQ-
  1351.   java-linux-a4.ps.  Full source for the original at
  1352.   http://www.place.org/~stevemw/java/FAQ/.
  1353.  
  1354.   The FAQ is regularly mirrored to http://www.blackdown.org/java-
  1355.   linux/docs/faq/FAQ-java-linux.html.
  1356.  
  1357.   11.3.
  1358.  
  1359.   Please Help the FAQ Maintainer!
  1360.  
  1361.   The FAQ maintainer is looking for the following information:
  1362.  
  1363.   o  Slackware (and other Linux distribution) setup issues.
  1364.  
  1365.   o  Any CJK setup tips and suggestions you may have.
  1366.  
  1367.   o  Your experiences with the Java Webserver.
  1368.  
  1369.   o  Tips and problems using your window manager with the Blackdown JDK.
  1370.  
  1371.   o  <That burning question you just spent hours to answer yourself!>
  1372.  
  1373.   11.4.  Are there Any Plans for Automating the FAQ?
  1374.  
  1375.   At this point, the FAQ maintainer has considered FAQ-o-matic (found at
  1376.   http://www.dartmouth.edu/cgi-bin/cgiwrap/jonh/faq.pl) and Wiki web
  1377.   (found at http://c2.com/cgi/wiki).  Your comments and suggestions
  1378.   would be appreciated.
  1379.  
  1380.   11.5.  Caveat Emptor
  1381.  
  1382.   This document may contain technical information that is incorrect,
  1383.   out-dated, and may unintentionally misrepresent the opinions of java-
  1384.   linux@java.blackdown.org participants.  Neither the FAQ maintainer nor
  1385.   the members of the mailing list make any warranty with respect to its
  1386.   usefulness or safety.
  1387.  
  1388.   11.6.  Terms of Use
  1389.  
  1390.   This document is copyright 1998 by Stephen M. Wynne. You may use,
  1391.   disseminate, and reproduce it freely, provided you:
  1392.  
  1393.   o  Do not omit or alter this copyright notice.
  1394.  
  1395.   o  Do not omit or alter or omit the version number and date.
  1396.  
  1397.   o  Do not omit or alter the document's pointer to the current WWW
  1398.      version.
  1399.  
  1400.   o  Clearly mark any condensed, altered or versions as such.
  1401.  
  1402.      These restrictions are intended to protect potential readers from
  1403.      stale versions.
  1404.  
  1405.   11.7.  Acknowledgements
  1406.  
  1407.   This FAQ's content and structure was inspired by several documents
  1408.   produced by Eric S. Raymond. Eric also maintained an early HOWTO
  1409.   regarding Java on Linux. It's archived at
  1410.   http://sagan.earthspace.net/~esr/faqs/java.html.
  1411.  
  1412.   The FAQ was produced directly from SGML with the SGML tools package
  1413.   v0.99.0, using the LINUXDOC.DTD.
  1414.  
  1415.