This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[XHTML 1.0] - java faq patches


Hi
I'm working on converting the GCC website to be XHTML 1.0 compliant. At 
last, I'm now working on the jave/ subdir.
I've already taken care of the side navigation menu, and I'm now working on 
the various pages.

The file faq.html had to be heavuly rewritten, so I thought I would post 
its diff before going on with the work, to receive any comment on my 
choices. I've tried to make it appear as close as possible to how it did 
before. The results are quite good with IE 6, while using lynx (in some 
places) I liked it best before.
The problem is, using <h_> tags inside <dt> tags is illegal in XHTML, while 
worked quite wll in HTML.

Anyway, here is the patch and the ChangeLog entry...

fwyzard

2002-03-13  Andrea Bocci <fwyzard@inwind.it>

         * faq.html (GCJ FAQ): Converted to XHTML 1.0.
Index: java/faq.html
===================================================================
RCS file: /cvsroot/gcc/wwwdocs/htdocs/java/faq.html,v
retrieving revision 1.50
diff -u -3 -p -r1.50 faq.html
--- java/faq.html	3 Feb 2002 02:25:16 -0000	1.50
+++ java/faq.html	13 Mar 2002 18:24:32 -0000
@@ -5,25 +5,26 @@
 
 <body bgcolor="#FFFFFF">
 
-<GCJNAV>
+<gcjnav>
 
- <br>
-      <br>
+<br />
+      <br />
       <h1>The GCJ FAQ</h1>
       <p>The latest version of this document is always available at <a href="faq.html">http://gcc.gnu.org/java/faq.html</a>.</p>
       <p>This FAQ is also available in <a href="faq-portugese.html">Brazilian Portugese</a>.</p>
       <ol>
         <li><a href="#1_0">General Questions</a> 
           <ol>
-            <li><a href="#1_1">What license is used for libgcj?</a> 
-            <li><a href="#1_2">How can I report a bug in libgcj?</a> 
-            <li><a href="#1_3">How can I contribute to libgcj?</a> 
-            <li><a href="#1_4">Is libgcj part of GCC?</a> 
-            <li><a href="#1_5">Will gcj and libgcj work on my machine?</a> 
-            <li><a href="#1_6">How can I debug my Java program?</a> 
-            <li><a href="#1_7">Can I interface byte-compiled and native java code?</a>
+            <li><a href="#1_1">What license is used for libgcj?</a></li>
+            <li><a href="#1_2">How can I report a bug in libgcj?</a></li>
+            <li><a href="#1_3">How can I contribute to libgcj</a></li>
+            <li><a href="#1_4">Is libgcj part of GCC?</a></li>
+            <li><a href="#1_5">Will gcj and libgcj work on my machine?</a></li>
+            <li><a href="#1_6">How can I debug my Java program?</a></li>
+            <li><a href="#1_7">Can I interface byte-compiled and native java code?</a></li>
           </ol>
-        <li><a href="#2_0">Java Feature Support</a> 
+        </li>
+        <li><a href="#2_0">Java Feature Support</a>
           <ol>
             <li><a href="#2_1">What Java API's are supported? How complete is 
               the support? </a></li>
@@ -37,45 +38,49 @@
               to supplement libgcj's current features ?</a></li>
             <li><a href="#2_8">What features of the Java language are/arn't supported</a></li>
           </ol>
+        </li>
         <li><a href="#3_0">Build Issues</a> 
           <ol>
             <li><a href="#3_1">I need something more recent than the last release; how
-                  should I build it?</a>
-            <li><a href="#3_2">Linker bug on Solaris</a> 
-            <li><a href="#3_3">Can I configure/build in the source tree?</a> 
-	    <li><a href="#3_4">My libgcj build fails with "invalid use of undefined type struct sigcontext_struct"</a>
+                  should I build it?</a></li>
+            <li><a href="#3_2">Linker bug on Solaris</a></li>
+            <li><a href="#3_3">Can I configure/build in the source tree?</a></li>
+            <li><a href="#3_4">My libgcj build fails with "invalid use of undefined type struct sigcontext_struct"</a></li>
           </ol>
+        </li>
         <li><a href="#4_0">Gcj Compile/Link Questions</a> 
           <ol>
             <li><a href="#4_1">Why do I get <tt>undefined reference to `main'</tt> 
-              errors?</a> 
-            <li><a href="#4_2">Can GCJ only handle source code? </a> 
+              errors?</a></li>
+            <li><a href="#4_2">Can GCJ only handle source code? </a></li>
             <li><a href="#4_3">&quot;gcj -C" Doesnt seem to work like javac/jikes. 
-              Whats going on? </a> 
-            <li><a href="#4_4">Where does GCJ look for files? </a> 
+              Whats going on? </a></li>
+            <li><a href="#4_4">Where does GCJ look for files? </a></li>
             <li><a href="#4_5">How does gcj resolve wether to compile .class or 
-              .java files? </a> 
-            <li><a href="#4_6">I'm getting link errors!</a> 
-	    <li><a href="#4_7">I'm getting 'undefined symbol: __dso_handle'</a>
+              .java files? </a></li>
+            <li><a href="#4_6">I'm getting link errors!</a></li>
+            <li><a href="#4_7">I'm getting 'undefined symbol: __dso_handle'</a></li>
           </ol>
+        </li>
         <li><a href="#5_0">Runtime Questions</a> 
           <ol>
-            <li><a href="#5_1">My program is dumping core! What's going on?</a> 
+            <li><a href="#5_1">My program is dumping core! What's going on?</a></li>
             <li><a href="#5_2">When I run the debugger I get a SEGV in the GC! 
-              What's going on?</a> 
+              What's going on?</a></li>
             <li><a href="#5_3">I have just compiled and benchmarked my Java application 
             and it seems to be running slower than than XXX JIT JVM. Is there 
-            anything I can do to make it go faster?</a>
-            <li><a href="#5_4">Can I profile Garbage Collection? </a> 
+            anything I can do to make it go faster?</a></li>
+            <li><a href="#5_4">Can I profile Garbage Collection? </a></li>
             <li><a href="#5_5">How do I increase the runtime's initial and maximum 
-              heap sizes?</a> 
-            <li><a href="#5_6">How can I profile my application?</a> 
-	    <li><a href="#5_7">My program seems to hang and doesn't produce any output</a>
+              heap sizes?</a></li>
+            <li><a href="#5_6">How can I profile my application?</a></li>
+            <li><a href="#5_7">My program seems to hang and doesn't produce any output</a></li>
           </ol>
+        </li>
         <li><a href="#6_0">Programming Issues</a> 
           <ol>
             <li><a href="#6_1">Are there any examples of how to use CNI?</a></li>
-	    <li><a href="#6_2">Is it possible to invoke GCJ compiled Java code from a C++ application?</a></li>
+            <li><a href="#6_2">Is it possible to invoke GCJ compiled Java code from a C++ application?</a></li>
           </ol>
         </li>
       </ol>
@@ -86,91 +91,92 @@
           </th>
         </tr>
       </table>
-      <br>
-      <dl> 
-        <dt> 
-          <h3><a name="1_1">1.1 What license is used for libgcj?</a></h3>
-        </dt>
-        <p> 
+      
+      <br />
+      <h3><a name="1_1">1.1 What license is used for libgcj?</a></h3>
+      <dl>
         <dd>
           libgcj is distributed under the GPL, with the 'libgcc exception'.
           This means that linking with libgcj does not by itself cause
           your program to fall under the GPL.  See LIBGCJ_LICENSE in
           the source tree for more details.
         </dd>
-        <p></p>
-        <dt> 
-          <hr>
-          <h3><a name="1_2">1.2 How can I report a bug in libgcj?</a></h3>
-        </dt>
-        <p> 
-        <dd>libgcj has a corresponding <a
+      </dl>
+      
+      <hr />
+      <h3><a name="1_2">1.2 How can I report a bug in libgcj?</a></h3>
+      <dl>
+        <dd>
+          libgcj has a corresponding <a
       href="http://gcc.gnu.org/cgi-bin/gnatsweb.pl?user=guest&amp;password=guest&amp;database=gcc&amp;cmd=login";>Gnats 
           bug database</a> which you can browse. You can also submit new bug reports 
-          from the Gnats page.</dd>
-        <p></p>
-        <dt> 
-          <hr>
-          <h3><a name="1_3">1.3 How can I contribute to libgcj?</a></h3>
-        </dt>
-        <p> 
-        <dd>You can send simple bug fixes in as patches. Please follow the <a href="http://gcc.gnu.org/contribute.html";>GCC 
+          from the Gnats page.
+        </dd>
+      </dl>
+      
+      <hr />
+      <h3><a name="1_3">1.3 How can I contribute to libgcj?</a></h3>
+      <dl> 
+        <dd>
+          You can send simple bug fixes in as patches. Please follow the <a href="http://gcc.gnu.org/contribute.html";>GCC 
           guidelines for submitting patches</a>. For more complex changes, you 
           must sign copyright over to the Free Software Foundation. See the <a href="contrib.html">contribution</a> 
-          page for details.</dd>
-        <p></p>
-        <dt> 
-          <hr>
-          <h3><a name="1_4">1.4 Is libgcj part of GCC?</a></h3>
-        </dt>
-        <p> 
-        <dd>Yes, libgcj is now part of GCC. It can be downloaded,
-        configured and built as one single tree.</dd>
-        <p></p>
-        <dt> 
-          <hr>
-          <h3><a name="1_5">1.5 Will gcj and libgcj work on my machine?</a></h3>
-        </dt>
-        <p> 
-        <dd>Gcj and libgcj are known to work more or less with IA-32 and 
+          page for details.
+        </dd>
+      </dl>
+ 
+      <hr />
+      <h3><a name="1_4">1.4 Is libgcj part of GCC?</a></h3>
+      <dl> 
+        <dd>
+          Yes, libgcj is now part of GCC. It can be downloaded,
+          configured and built as one single tree.
+        </dd>
+      </dl>
+ 
+      <hr />
+      <h3><a name="1_5">1.5 Will gcj and libgcj work on my machine?</a></h3>
+      <dl> 
+        <dd>
+          Gcj and libgcj are known to work more or less with IA-32 and 
           Sparc Solaris, Tru64 Unix, as well as IA-32, IA-64, Alpha, and PowerPC 
-	  Linux. They might work on other systems. Generally speaking, porting to a new 
-	  system should not be hard. This would be a good way to volunteer.</dd>
-        <p></p>
-        <dt> 
-          <hr>
-          <h3><a name="1_6">1.6 How can I debug my Java program?</a></h3>
-        </dt>
-        <p> 
-        <dd><a href="ftp://ftp.gnu.org/pub/gnu/gdb/";>gdb 5.0</a> 
+          Linux. They might work on other systems. Generally speaking, porting to a new 
+          system should not be hard. This would be a good way to volunteer.
+        </dd>
+      </dl>
+ 
+      <hr />
+      <h3><a name="1_6">1.6 How can I debug my Java program?</a></h3>
+      <dl> 
+        <dd>
+          <a href="ftp://ftp.gnu.org/pub/gnu/gdb/";>gdb 5.0</a> 
           includes support for debugging gcj-compiled Java programs. For more 
-	  information please read <a href="gdb.html">Java Debugging with gdb</a>.</dd>
-        <dt>&nbsp; </dt>
-
-        <dt> 
-          <hr>
-          <h3><a name="1_7">1.7 Can I interface byte-compiled and native java code</a></h3>
-        </dt>
-        <p> 
-        <dd>
-	libgcj has a bytecode interpreter that allows you to mix .class files with
-	compiled code. It works pretty transparently: if a compiled version of a class is
-	not found in the application binary or linked shared libraries, the class loader
-	will search for a bytecode version in your classpath, much like a VM would. Be
-	sure to build libgcj with the --enable-interpreter option to enable this
-	functionality. Currently this only works on x86 linux. 
-        <p>
-	<p>The program "gij" provides a front end to the interpreter that behaves
-	much like a traditional virtual machine. You can even use "gij" to run a shared library 
-	which is compiled from java code and contains a main method:
-<pre>
+          information please read <a href="gdb.html">Java Debugging with gdb</a>.
+        </dd>
+      </dl>
+ 
+      <hr />
+      <h3><a name="1_7">1.7 Can I interface byte-compiled and native java code</a></h3>
+      <dl> 
+        <dd>
+          <p>libgcj has a bytecode interpreter that allows you to mix .class files with
+          compiled code. It works pretty transparently: if a compiled version of a class is
+          not found in the application binary or linked shared libraries, the class loader
+          will search for a bytecode version in your classpath, much like a VM would. Be
+          sure to build libgcj with the --enable-interpreter option to enable this
+          functionality. Currently this only works on x86 linux.</p>
+        
+          <p>The program "gij" provides a front end to the interpreter that behaves
+          much like a traditional virtual machine. You can even use "gij" to run a shared library 
+          which is compiled from java code and contains a main method:</p>
+          <pre>
 $ gcj -shared -o HelloWorld.so HelloWorld.java
 $ gij HelloWorld
-</pre>
+          </pre>
           This works because gij uses Class.forName, which knows how to load shared objects.
         </dd>
-        <dt>&nbsp; </dt>	
       </dl>
+      
       <table border="0" cellpadding="4" width="95%">
         <tr bgcolor="#B0D0FF"> 
           <th align="left"> 
@@ -178,126 +184,134 @@ $ gij HelloWorld
           </th>
         </tr>
       </table>
-      <dl> 
-      </dl>
+      
+      <br />
       <h3><a name="2_1">2.1 What Java API's are supported?</a> How complete is 
         the support?</h3>
       <dl> 
-        <p><dd><a href="mailto:mdw@cs.berkeley.edu";>Matt Welsh</a> writes:</dd></p>
-        <dl>
-          <dd>Just look in the 'libjava' directory of libgcj and see what classes 
+        <dd>
+          <a href="mailto:mdw@cs.berkeley.edu";>Matt Welsh</a> writes:
+          <blockquote>
+            <p>Just look in the 'libjava' directory of libgcj and see what classes 
             are there. Most GUI stuff isn't there yet, that's true, but many of 
-            the other classes are easy to add if they don't yet exist. </dd>
-          <dt>&nbsp;</dt>
-          <dd>I think it's important to stress that there is a big difference 
+            the other classes are easy to add if they don't yet exist. </p>
+
+            <p>I think it's important to stress that there is a big difference 
             between Java and the many libraries which Java supports. Unfortunately, 
             Sun's promise of &quot;write once, run everywhere&quot; assumes much 
             more than a JVM: you also need the full set of JDK libraries. Considering 
             that new Java APIs come out every week, it's going to be impossible 
-            to track everything. </dd>
-          <dt>&nbsp;</dt>
-          <dd>To make things worse, you can't simply run Sun's JDK classes on 
+            to track everything. </p>
+  
+            <p>To make things worse, you can't simply run Sun's JDK classes on 
             any old JVM -- they assume that a bunch of native methods are also 
             defined. Since this native method requirement isn't defined by the 
             JDK specs, you're effectively constrained to using Sun's JVMs if you 
             want to use Sun's JDK libraries. Oh yes -- you could also reimplement 
             all of those native methods yourself, and make sure they behave exactly 
-            as Sun's do. Note that they're undocumented! </dd>
-        </dl>
-        <dt>&nbsp;</dt>
-       </dl>
-        </dl>
-        <hr>
-        <h3><a name="2_2">2.2 </a>Does GCJ support using straight C native methods 
-          ala JNI? </h3>
-        <blockquote> 
-	  <p>Yes. libgcj now has experimental support for JNI, in addition to
-	  its native Compiled Native Interface (CNI). gcjh will generate JNI 
-	  stubs and headers using the "-jni" option. However, we do 
-	  prefer CNI: it is more efficient, easier to write, and (at least 
-	  potentially) easier to debug.
-        </blockquote>
-        <hr>
-        <h3><a name="2_3">2.3 </a>Why does GCJ use CNI? </h3>
-        <blockquote> 
-          <p><a href="mailto:per@bothner.com";>Per Bothner</a> explains </p>
+            as Sun's do. Note that they're undocumented! </p>
+          </blockquote>
+        </dd>
+      </dl>
+      
+      <hr />
+      <h3><a name="2_2">2.2 </a>Does GCJ support using straight C native methods 
+         ala JNI? </h3>
+      <dl>
+        <dd>
+          Yes. libgcj now has experimental support for JNI, in addition to
+          its native Compiled Native Interface (CNI). gcjh will generate JNI 
+          stubs and headers using the "-jni" option. However, we do 
+          prefer CNI: it is more efficient, easier to write, and (at least 
+          potentially) easier to debug.
+        </dd>
+      </dl>
+        
+      <hr />
+      <h3><a name="2_3">2.3 </a>Why does GCJ use CNI? </h3>
+      <dl> 
+        <dd>
+          <a href="mailto:per@bothner.com";>Per Bothner</a> explains:
           <blockquote> 
             <p>We use CNI because we think it is a better solution, especially 
-              for a Java implementation that is based on the idea that Java is 
-              just another programming language that can be implemented using 
-              standard compilation techniques. Given that, and the idea that languages 
-              implemented using Gcc should be compatible where it makes sense, 
-              it follows that the Java calling convention should be as similar 
-              as practical to that used for other languages, especially C++, since 
-              we can think of Java as a subset of C++. CNI is just a set of helper 
-              functions and conventions built on the idea that C++ and Java have 
-              the *same* calling convention and object layout; they are binary 
-              compatible. (This is a simplification, but close enough.)</p>
+            for a Java implementation that is based on the idea that Java is 
+            just another programming language that can be implemented using 
+            standard compilation techniques. Given that, and the idea that languages 
+            implemented using Gcc should be compatible where it makes sense, 
+            it follows that the Java calling convention should be as similar 
+            as practical to that used for other languages, especially C++, since 
+            we can think of Java as a subset of C++. CNI is just a set of helper 
+            functions and conventions built on the idea that C++ and Java have 
+            the *same* calling convention and object layout; they are binary 
+            compatible. (This is a simplification, but close enough.)</p>
           </blockquote>
-        </blockquote>
-        <hr>
+        </dd>
       </dl>
+      
+      <hr />
       <h3><a name="2_4">2.4 What is the state of AWT support</a>?</h3>
       <dl> 
-        <dd> Work is in progress to implement AWT and Java2D. We 
-	intend to support both GTK and xlib peers written using CNI. Some
-	components are already working atop the 
-	<A HREF="http://www.ii.uib.no/~rolfwr/jcnix/";>xlib peers</A>.
+        <dd>
+          Work is in progress to implement AWT and Java2D. We 
+          intend to support both GTK and xlib peers written using CNI. Some
+          components are already working atop the 
+          <a href="http://www.ii.uib.no/~rolfwr/jcnix/";>xlib peers</a>.
+        </dd>
       </dl>
-      <hr>
-
+      
+      <hr />
       <h3><a name="2_5">2.5 How about support for Swing</a>?</h3>
       <dl> 
-        <dd>Once AWT support is working then Swing support can be considered. There
-	is at least one free-software partial implementations of Swing that may 
-	be usable.
+        <dd>
+          Once AWT support is working then Swing support can be considered. There
+          is at least one free-software partial implementations of Swing that may 
+          be usable.
         </dd>
       </dl>
-      <hr>
-
+      
+      <hr />
       <h3><a name="2_6">2.6 </a>What support is there for RMI?</h3>
       <dl> 
         <dd> RMI code exists on the CVS trunk (aka gcc 3.1), but it
-	      has not been heavily tested.  This code was donated by
-	      Transvirtual Technologies.
-	</dd>
+              has not been heavily tested.  This code was donated by
+              Transvirtual Technologies.
+        </dd>
       </dl>
-      <hr>
-
+      
+      <hr />
       <h3><a name="2_7">2.7 Can I use any code from other OpenSource
         projects to supplement libgcj's current features?</a></h3>
       <dl> 
-	<dd>
-	<p> Certainly. However, in many cases, if you wanted to contribute the 
-	code back into the official libgcj distribution, we would require that the 
-	original author(s) assign copyright to the Free Software Foundation.  
-	<p> As of March 6, 2000, libgcj has been relicenced, and copyright has
-	been assigned to the <A HREF="http://www.gnu.org/";>FSF</A>. This allows 
-	us to share and merge much of the libgcj codebase with the 
-	<A HREF="http://www.gnu.org/software/classpath/";>Classpath</A> project. 
-	Our eventual goal is for Classpath to be an upstream source provider for libgcj, 
-	however it will be some time before this becomes reality: libgcj and Classpath 
-	have different implementations of
-	many core java classes. In order to merge them, we need to select the 
-	best (most efficient, cleanest) implementation of each method/class/package,
-	resolve any conflicts created by the merge, and test the final result. 
-	Needless to say, this is a lot of work. If you can help out, please
-	<A HREF="mailto:java@gcc.gnu.org";>let us know</A>!
-      </dl>
-      <hr>
-
-      <dl> 
-        <dt> 
-          <h3><a name="2_8">2.8 What features of the Java language are/aren't supported.</a></h3>
-        </dt>
-        <dd>GCJ supports all Java language constructs as per the 
-          <a href="http://java.sun.com/docs/books/jls/";>Java language Specification</a>. 
-	  Recent GCJ snapshots have added support for most JDK1.1 (and beyond)
-	  language features, including inner classes.
+        <dd>
+          <p> Certainly. However, in many cases, if you wanted to contribute the 
+          code back into the official libgcj distribution, we would require that the 
+          original author(s) assign copyright to the Free Software Foundation. </p>
+          <p> As of March 6, 2000, libgcj has been relicenced, and copyright has
+          been assigned to the <a href="http://www.gnu.org/";>FSF</a>. This allows 
+          us to share and merge much of the libgcj codebase with the 
+          <a href="http://www.gnu.org/software/classpath/";>Classpath</a> project. 
+          Our eventual goal is for Classpath to be an upstream source provider for libgcj, 
+          however it will be some time before this becomes reality: libgcj and Classpath 
+          have different implementations of
+          many core java classes. In order to merge them, we need to select the 
+          best (most efficient, cleanest) implementation of each method/class/package,
+          resolve any conflicts created by the merge, and test the final result. 
+          Needless to say, this is a lot of work. If you can help out, please
+          <a href="mailto:java@gcc.gnu.org";>let us know</a>!</p>
+        </dd>
       </dl>
-      <dl> 
-        <p></p>
+      
+      <hr />
+      <h3><a name="2_8">2.8 What features of the Java language are/aren't supported.</a></h3>
+      <dl>
+        <dd>
+          GCJ supports all Java language constructs as per the 
+          <a href="http://java.sun.com/docs/books/jls/";>Java language Specification</a>. 
+          Recent GCJ snapshots have added support for most JDK1.1 (and beyond)
+          language features, including inner classes.
+        </dd>
       </dl>
+      
       <table border="0" cellpadding="4" width="95%">
         <tr bgcolor="#b0d0ff"> 
           <th align="left"> 
@@ -306,25 +320,20 @@ $ gij HelloWorld
         </tr>
       </table>
 
+      <br /> 
+      <h3><a name="3_1">3.1 I need something more recent than the last release. 
+          How should I build it?</a></h3>
       <dl> 
-        <dt> 
-          <h3><a name="3_1">3.1 I need something more recent than the last release. 
-	  How should I build it?</a></h3>
-        </dt>
-        <p> 
-        <dd>Please read <a href="build-snapshot.html">here</a>.
+        <dd>
+          Please read <a href="build-snapshot.html">here</a>.
         </dd>
-        <p></p>
       </dl>
 
-      <hr>
-
+      <hr />
+      <h3><a name="3_2">3.2 Linker bug on Solaris</a></h3>
       <dl> 
-        <dt> 
-          <h3><a name="3_2">3.2 Linker bug on Solaris</a></h3>
-        </dt>
-        <p> 
-        <dd>There is a known problem with the <a href="http://gcc.gnu.org/ml/gcc-bugs/1999-10/msg00159.html";> 
+        <dd>
+          There is a known problem with the <a href="http://gcc.gnu.org/ml/gcc-bugs/1999-10/msg00159.html";> 
           native Solaris linker</a> when using gcc/gcj. A good indication you've 
           run into this problem is if you get an error that looks like the following 
           when building libgcj: 
@@ -333,59 +342,52 @@ ld: warning: option -o appears more than
 ld: fatal: file libfoo.so: cannot open file: No such file or directory
 ld: fatal: File processing errors. No output written to .libs/libfoo.so
 collect2: ld returned 1 exit status
-	</pre>
+          </pre>
           A known workaround for this and other reported link problems on the 
           various releases of Solaris is to build gcc/gcj with the <a href="ftp://sources.redhat.com/pub/binutils/snapshots";> 
           latest GNU binutils</a> instead of the native Solaris <tt>ld</tt>. The 
           most straightforward way to do this is to build and install binutils, 
           and then reference it in the configure for gcc via <tt>--with-ld=/path_to_binutils_install/bin/ld</tt> 
           (<tt>--with-as</tt> may also be similarly specified but is not believed 
-          to be required). 
-          <p> Please note, gcc/gcj must be built using GNU ld prior to doing a 
-            clean build of libgcj! 
+          to be required).
+          <br />
+          Please note, gcc/gcj must be built using GNU ld prior to doing a 
+          clean build of libgcj! 
         </dd>
-        <p></p>
       </dl>
 
-      <hr>
-
+      <hr />
+      <h3><a name="3_3">3.3 Can I configure/build in the source tree?</a></h3>
       <dl> 
-        <dt> 
-          <h3><a name="3_3">3.3 Can I configure/build in the source tree?</a></h3>
-        </dt>
-        <p> 
-        <dd>No.  You cannot configure/build in the source tree.  If you try,
-	you'll see something like:
-	<pre>
+        <dd>
+          No.  You cannot configure/build in the source tree.  If you try,
+          you'll see something like:
+          <pre>
 $ ./configure [...]
 Configuring for a i686-pc-linux-gnu host.
 *** Cannot currently configure in source tree.
-	</pre>
-	Instead, you must build in another directory.  E.g.:
-	<pre>
+          </pre>
+          Instead, you must build in another directory.  E.g.:
+          <pre>
 $ mkdir build
 $ cd build
 $ ../configure [...]
-	</pre>
+          </pre>
         </dd>
-        <p></p>
       </dl>
       
-      <hr>
-
+      <hr />
+      <h3><a name="3_4">3.4 My libgcj build fails with "invalid use of undefined type struct sigcontext_struct"</a></h3>
       <dl> 
-        <dt> 
-          <h3><a name="3_4">3.4 My libgcj build fails with "invalid use of undefined type struct sigcontext_struct"</a></h3>
-        </dt>
-        <p> 
-	<dd>If you're using Linux, this probibly means you need to upgrade to
-	a newwer, glibc (libc6) based Linux distribution. libgcj does not 
-	support the older linux libc5.
-	<p>It might be possible to get a working libgcj by changing occurances
-	of "sigcontext_struct" to "sigcontext", however this has not been tested.
-	Even if it works, it is likely that there are other issues with older
-	libc versions that would prevent libgcj from working correctly (threads
-	bugs, for example).
+        <dd>
+          <p>If you're using Linux, this probibly means you need to upgrade to
+          a newwer, glibc (libc6) based Linux distribution. libgcj does not 
+          support the older linux libc5.</p>
+          <p>It might be possible to get a working libgcj by changing occurances
+          of "sigcontext_struct" to "sigcontext", however this has not been tested.
+          Even if it works, it is likely that there are other issues with older
+          libc versions that would prevent libgcj from working correctly (threads
+          bugs, for example).</p>
         </dd>
       </dl>
 
@@ -397,135 +399,112 @@ $ ../configure [...]
           </th>
         </tr>
       </table>
+ 
+      <br />
+      <h3><a name="4_1">4.1 Why do I get <tt>undefined reference to `main'</tt> 
+        errors?</a></h3>
       <dl> 
-        <dt> 
-          <h3><a name="4_1">4.1 Why do I get <tt>undefined reference to `main'</tt> 
-            errors?</a></h3>
-        </dt>
-      </dl>
-      <p> 
-      <dl> 
-        <dd>When using <tt>gcj</tt> to link a Java program, you must use the <tt>--main=</tt> 
+        <dd>
+          When using <tt>gcj</tt> to link a Java program, you must use the <tt>--main=</tt> 
           option to indicate the class that has the desired <tt>main</tt> method. 
           This is because every Java class can have a <tt>main</tt> method, thus 
-          you have to tell gcj which one to use.</dd>
-        <dt>&nbsp;</dt>
-        <hr>
-      </dl>
-      <dl> 
-        <dt> 
-          <h3><a name="4_2">4.2 Can GCJ only handle source code?</a></h3>
-        </dt>
-      </dl>
-      <p> 
-      <dl> 
-        <dd>GCJ will compile both source <code>(.java)</code> and bytecode 
-	  <code>(.class)</code> files. However, in many cases the native code produced 
-	  by compiling from source is better optimized than that compiled from .class 
-	  files. 
-	  
-        <p><a href="mailto:per@bothner.com";>Per Bothner</a> explains: </p>
-        </dd>
-          <dl> 
-            <dd>The reason is that when you compile to bytecode you lose a lot 
-              of information about program structure etc. That information helps 
-              in generating better code. We can in theory recover the information 
-              we need by analysing the structure of the bytecodes, but it is sometimes 
-              difficult - or sometimes it just that no-one has gotten around to 
-              it. 
-              <p>Specific examples include loop structure (gcc generates better 
-                code with explicit loops rather than with the equivalent spaghetti 
-                code), array initializers, and the JDK 1.1 `CLASS.class' syntax, 
-                all of which are represented using more low-level constructs in 
-                bytecode.</p>
-            </dd>
-          </dl>
-      </dl>
-      <hr>
-
-      <dl> 
-        <dt> 
-	  <h3><a name="4_3">4.3 &quot;gcj -C"</a> Doesnt seem to work like javac/jikes. 
-              Whats going on?</h3>
-        </dt>
-        <blockquote>
+          you have to tell gcj which one to use.
+        </dd>
+      </dl>
+    
+      <hr />
+      <h3><a name="4_2">4.2 Can GCJ only handle source code?</a></h3>
+      <dl>
+        <dd>
+          <p>GCJ will compile both source <code>(.java)</code> and bytecode 
+          <code>(.class)</code> files. However, in many cases the native code produced 
+          by compiling from source is better optimized than that compiled from .class 
+          files.</p>
+          
+          <p><a href="mailto:per@bothner.com";>Per Bothner</a> explains: </p>
+          <blockquote> 
+            <p>The reason is that when you compile to bytecode you lose a lot 
+            of information about program structure etc. That information helps 
+            in generating better code. We can in theory recover the information 
+            we need by analysing the structure of the bytecodes, but it is sometimes 
+            difficult - or sometimes it just that no-one has gotten around to 
+            it.</p> 
+            <p>Specific examples include loop structure (gcc generates better 
+            code with explicit loops rather than with the equivalent spaghetti 
+            code), array initializers, and the JDK 1.1 `CLASS.class' syntax, 
+            all of which are represented using more low-level constructs in 
+            bytecode.</p>
+          </blockquote>
+        </dd>
+      </dl>
+      
+      <hr />
+      <h3><a name="4_3">4.3 &quot;gcj -C"</a> Doesnt seem to work like javac/jikes. 
+        Whats going on?</h3>
+      <dl>
+        <dd>
           <p>The behavior of "gcj -C" is not at all like javac or jikes, which 
-            will compile (not just scan) all .java's which are out of date with 
-            regard to their .class's.</p>
-        </blockquote>
+          will compile (not just scan) all .java's which are out of date with 
+          regard to their .class's.</p>
+        </dd>
       </dl>
-      <hr>
-
-      <dl> 
-        <dt> 
-          <h3><a name="4_4">4.4 Where does GCJ look for files?</a></h3>
-        </dt>
-        <blockquote> 
+      
+      <hr />
+      <h3><a name="4_4">4.4 Where does GCJ look for files?</a></h3>
+      <dl>
+        <dd> 
           <p>GCJ looks for classes to compile based on the CLASSPATH environment 
-            variable. <code>libgcj.jar</code> and other files are found relative to the 
-	    path of the compiler itself, so it is safe to move the entire compiler tree
-	    to a different path, and there is no need to include <code>libgcj.jar</code>
-	    in your CLASSPATH. </p>
-        </blockquote>
-      </dl>
-      <hr>
-
-      <dl> 
-        <dt> 
-          <h3><a name="4_5">4.5 How does gcj resolve whether to compile .class 
-            or .java files?</a></h3>
-        </dt>
-        <blockquote> 
-          <p>GCJ compiles only the files presented to it on the command line.  However,
-	  it also needs to scan other files in order to determine the layout of other
-	  classes and check for errors in your code.  For these dependencies, GCJ will
-	  favour .class files if they are available because it is faster to parse a 
-	  class file than source code.
-        </blockquote>
-      </dl>
-      
-      <hr>
-      
-      <dl>
-        <dt>
-          <h3><a name="4_6">4.6 I'm getting link errors</a></h3>
-        </dt>
-        <blockquote>
-        <p>If you get errors at link time that refer to
+          variable. <code>libgcj.jar</code> and other files are found relative to the 
+          path of the compiler itself, so it is safe to move the entire compiler tree
+          to a different path, and there is no need to include <code>libgcj.jar</code>
+          in your CLASSPATH. </p>
+        </dd>
+      </dl>
+
+      <hr />
+      <h3><a name="4_5">4.5 How does gcj resolve whether to compile .class 
+        or .java files?</a></h3>
+      <dl>
+        <dd>
+          <p>GCJ compiles only the files presented to it on the command line. However,
+          it also needs to scan other files in order to determine the layout of other
+          classes and check for errors in your code.      For these dependencies, GCJ will
+          favour .class files if they are available because it is faster to parse a 
+          class file than source code.</p>
+        </dd>
+      </dl>
+      
+      <hr />
+      <h3><a name="4_6">4.6 I'm getting link errors</a></h3>
+
+      <dl>
+        <dd>
+          <p>If you get errors at link time that refer to
           'undefined reference to `java::lang::Object type_info function',
           verify that you have compiled any CNI C++ files with the
           -fno-rtti option. This is only required for versions of GCJ earlier 
-	  than 3.0.
-        </blockquote>
+          than 3.0.</p>
+        </dd>
       </dl>
 
-      <hr>
-
+      <hr />
+      <h3><a name="4_7">4.7 I'm getting 'undefined symbol: __dso_handle'</a></h3>
       <dl>
-	<dt>
-          <h3><a name="4_7">4.7 I'm getting 'undefined symbol: __dso_handle'</a></h3>
-	</dt>
-	<dd>
-	Some versions of the GNU linker have broken support for the '.hidden'
-	directive, which results in problems with shared libraries built with
-	recent versions of gcc.	
-	<p>
-	There are three solutions:
-	<ul>
-	  <li>downgrade to binutils that don't support .hidden at all,
-	  <li>upgrade to a recent binutils, or
-	  <li>undef the HAVE_GAS_HIDDEN definition in gcc's auto-host.h
-	  (and rebuild gcc).
-	</ul>
-	</dd>
+        <dd>
+          <p>Some versions of the GNU linker have broken support for the '.hidden'
+          directive, which results in problems with shared libraries built with
+          recent versions of gcc. </p>
+        
+          <p>There are three solutions: </p>
+          <ul>
+            <li>downgrade to binutils that don't support .hidden at all,</li>
+            <li>upgrade to a recent binutils, or</li>
+            <li>undef the HAVE_GAS_HIDDEN definition in gcc's auto-host.h
+            (and rebuild gcc).</li>
+          </ul>
+        </dd>
       </dl>
       
-      <dl> 
-        <dt>&nbsp; </dt>
-      </dl>
-      <dl> 
-        <p></p>
-      </dl>
       <table border="0" cellpadding="4" width="95%">
         <tr bgcolor="#B0D0FF"> 
           <th align="left"> 
@@ -533,47 +512,39 @@ $ ../configure [...]
           </th>
         </tr>
       </table>
-      <dl> 
-        <dt> 
-          <h3><a name="5_1">5.1 My program is dumping core! What's going on?</a></h3>
-        </dt>
+ 
+      <br />
+      <h3><a name="5_1">5.1 My program is dumping core! What's going on?</a></h3>
+      <dl>
         <dd>
-	  It could be any number of things. One common mistake is
+          It could be any number of things. One common mistake is
           having your <tt>CLASSPATH</tt> environment variable pointing
           at a third party's java.lang and friends. Either unset
           <tt>CLASSPATH</tt>, or make sure it does not refer to core
           libraries other than those found in
           <tt>libgcj.jar</tt>.Note that newwer versions of 
-	  GCJ will reject the core class library if it wasn't 
-	  <A HREF="http://gcc.gnu.org/ml/java/2001-03/msg00383.html";>generated</A>
+          GCJ will reject the core class library if it wasn't 
+          <a href="http://gcc.gnu.org/ml/java/2001-03/msg00383.html";>generated</a>
           by GCJ itself.
         </dd>
       </dl>
+ 
+      <hr />
+      <h3><a name="5_2">5.2 When I run the debugger I get a SEGV in the GC! 
+        What's going on?</a></h3>
       <dl> 
-        <dt> 
-          <hr>
-          <h3><a name="5_2">5.2 When I run the debugger I get a SEGV in the GC! 
-            What's going on?</a></h3>
-        </dt>
-      </dl>
-      <p> 
-      <dl> 
-        <dd>This is "normal"; the Garbage Collector (GC) uses it to determine 
+        <dd>
+          This is "normal"; the Garbage Collector (GC) uses it to determine 
           stack boundaries. It is ordinarily caught and handled by the GC -- you 
           can see this in the debugger by using <tt>cont</tt> to continue to the 
           "real" segv. 
         </dd>
       </dl>
-      <p></p>
-      <dl> 
-        <dt> 
-          <hr>
-          <h3><a name="5_3">5.3 I have just compiled and benchmarked my Java application 
+ 
+      <hr />
+      <h3><a name="5_3">5.3 I have just compiled and benchmarked my Java application 
             and it seems to be running slower than than XXX JIT JVM. Is there 
             anything I can do to make it go faster?</a></h3>
-        </dt>
-      </dl>
-      <p> 
       <dl> 
         <dd>A few things: 
           <ul>
@@ -586,70 +557,66 @@ $ ../configure [...]
               array checks. If your code is ready, and it doesn't rely on them, 
               try compiling with --no-bounds-check. </li>
             <li>Try static linking.  On many platforms, dynamic (PIC) function 
-	      calls are more expensive than static ones. In particular, the 
-	      interaction with boehm-gc seems to incur extra overhead when shared 
-	      libraries are used. </li>
+              calls are more expensive than static ones. In particular, the 
+              interaction with boehm-gc seems to incur extra overhead when shared 
+              libraries are used. </li>
             <li>If your Java application doesn't need threads, try building libgcj 
               using --enable-threads=none. Portions of the libgcj runtime are 
               still more efficient when single-threaded.</li>
           </ul>
         </dd>
       </dl>
-      <p></p>
-      <p> 
-      <dl> 
-      <hr>
-        <dt> 
-          <h3><a name="5_4">5.4 Can I profile Garbage Collection?</a></h3>
-        </dt>
-        <dd>It is possible to turn on verbose GC output by supressing the -DSILENT 
+  
+      <hr />
+       <h3><a name="5_4">5.4 Can I profile Garbage Collection?</a></h3>
+      <dl>
+        <dd>
+          <p>It is possible to turn on verbose GC output by supressing the -DSILENT 
           flag during build. One way to do this is to comment out the line with 
-          #define SILENT 1 from boehm-gc/configure before configuring libgcj. 
+          #define SILENT 1 from boehm-gc/configure before configuring libgcj. </p>
+          <p>The GC will print collection statistics to stdout. (Rebuilding boehm-gc 
+          alone without this flag doesn't seem to work.)</p>
         </dd>
-        <dt>&nbsp;</dt>
-        <dd>The GC will print collection statistics to stdout. (Rebuilding boehm-gc 
-          alone without this flag doesn't seem to work.)</dd>
-        <dt>&nbsp;</dt>
-        <hr>
-        <dt> 
-          <h3><a name="5_5">5.5 How do I increase the runtime's initial and maximum 
-            heap sizes?</a></h3>
-        </dt>
-        <dd>Some programs that allocate many small, short-lived objects can cause 
+      </dl>
+
+      <hr />
+      <h3><a name="5_5">5.5 How do I increase the runtime's initial and maximum 
+        heap sizes?</a></h3>
+      <dl>
+        <dd>
+          <p>Some programs that allocate many small, short-lived objects can cause 
           the default-sized heap to fill quickly and GC often. With the 2.95.1 
           release there is no means to adjust the heap at runtime. Recent snapshots 
           provide the -ms and -mx arguments to gij to specify the initial and 
-          maximum heap sizes, respectively.</dd>
+          maximum heap sizes, respectively.</p>
+        </dd>
       </dl>
-      <hr>
-      <dl> 
-        <dt> 
-          <h3><a name="5_6">5.6 How can I profile my application?</a></h3>
-        </dt>
-        <dd>Currently, only single threaded Java code may be used by the profiler 
-	(gprof). POSIX threads seem to be incompatible with the gmon stuff.
-	<p>
-	A couple of other tools that have been mentioned on the GCJ mailing list are 
-	sprof and cprof.  The former is part of GNU libc; the latter can be found
-	<A HREF="http://opensource.corel.com/cprof.html";>here</A>.</p>
-	</dd>
-      </dl>
-      
-    <hr>  
-    <dl>
-	<dt>
+
+      <hr />
+      <h3><a name="5_6">5.6 How can I profile my application?</a></h3>
+      <dl>
+        <dd>
+          <p>Currently, only single threaded Java code may be used by the profiler 
+          (gprof). POSIX threads seem to be incompatible with the gmon stuff.</p>
+        
+          <p>A couple of other tools that have been mentioned on the GCJ mailing list are 
+          sprof and cprof.  The former is part of GNU libc; the latter can be found
+          <a href="http://opensource.corel.com/cprof.html";>here</a>.</p>
+        </dd>
+      </dl>
+      
+      <hr />  
       <h3><a name="5_7">5.7 My program seems to hang and doesn't produce any output</a></h3>
-	</dt>
-    <dd>
-    Some versions had a bug in the iconv support. You can work around
-    it by setting <tt>LANG=en_US.UTF-8</tt> at runtime, or give the
-    following option during compile time
-    <tt>-Dfile.encoding=UTF-8</tt>.  This problem should no longer
-    occur as of November 1, 2000.
-    </dd>
-    </dl>
+      <dl>
+        <dd>
+          <p>Some versions had a bug in the iconv support. You can work around
+          it by setting <tt>LANG=en_US.UTF-8</tt> at runtime, or give the
+          following option during compile time
+          <tt>-Dfile.encoding=UTF-8</tt>.  This problem should no longer
+          occur as of November 1, 2000.</p>
+        </dd>
+      </dl>
 
-      <p> 
       <table width="100%" border="0">
         <tr bgcolor="#B0D0FF" align="left"> 
           <th> 
@@ -657,46 +624,44 @@ $ ../configure [...]
           </th>
         </tr>
       </table>
+
+      <br />
       <h3><a name="6_1"></a>6.1 Are there any examples of how to use CNI?</h3>
-      <blockquote> 
-        <p>Glenn Chambers has created a couple 
-       of trivial examples for
-       <a href="cni-1.txt">version 2.95</a> 
-        and <a href="cni-2.txt">version 3.0</a>. 
-        As a comparision, <a href="jni-kaffe.txt">here</a>
-        is the same example as a JNI application using 
-        <a href="http://www.kaffe.org";>Kaffe</a>.  The same code will
-        work with GCJ, as shown <a href="jni-comp.txt">here</a>.
-        </p>
-        <p>
-        Note that for version 2.95, you must compile the C++ files 
-        used for CNI with the -fno-rtti option.
-        This constraint does not apply in version 3.0 and later.
-        </p>
-        <p>The primary source of documentation for CNI is at <a href="papers/cni/t1.html">http://gcc.gnu.org/java/papers/cni/t1.html</a></p>
-      </blockquote>
-
-      <hr>
-
-      <dl> 
-        <dt> 
-          <h3><a name="6_2">6.2 Is it possible to invoke GCJ compiled Java code from a C++ application?</a></h3>
-        </dt>
-        <blockquote> 
-          <p>Yes, the current GCJ 3.1 development sources support a CNI-based 
-	  invocation interface as well as the traditional JNI invocation API. </p>
-	  
-	  <p>CNI code just needs to call <code>JvCreateJavaVM()</code> and 
-	  <code>JvAttachCurrentThread()</code> before making any Java calls.
+      <dl>
+        <dd>
+          <p>Glenn Chambers has created a couple 
+          of trivial examples for
+          <a href="cni-1.txt">version 2.95</a> 
+          and <a href="cni-2.txt">version 3.0</a>. 
+          As a comparision, <a href="jni-kaffe.txt">here</a>
+          is the same example as a JNI application using 
+          <a href="http://www.kaffe.org";>Kaffe</a>.  The same code will
+          work with GCJ, as shown <a href="jni-comp.txt">here</a>.</p>
+        
+          <p>Note that for version 2.95, you must compile the C++ files 
+          used for CNI with the -fno-rtti option.
+          This constraint does not apply in version 3.0 and later.</p>
+          
+          <p>The primary source of documentation for CNI is at <a href="papers/cni/t1.html">http://gcc.gnu.org/java/papers/cni/t1.html</a></p>
+        </dd>
+      </dl>
 
+      <hr />
+      <h3><a name="6_2">6.2 Is it possible to invoke GCJ compiled Java code from a C++ application?</a></h3>
+      <dl>
+        <dd>
+          <p>Yes, the current GCJ 3.1 development sources support a CNI-based 
+          invocation interface as well as the traditional JNI invocation API. </p>
+          
+          <p>CNI code just needs to call <code>JvCreateJavaVM()</code> and 
+          <code>JvAttachCurrentThread()</code> before making any Java calls.
           See <a href="http://gcc.gnu.org/ml/java-patches/2001-q2/msg00224.html";>here</a> 
-	  for more details on how to use the CNI interface.
-	  </p>
-        </blockquote>
+          for more details on how to use the CNI interface. </p>
+        </dd>
       </dl>
 
 
-</GCJNAV>
+</gcjnav>
 
 </body>
 </html>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]