This is the mail archive of the java@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]

testing Jdom


Hi,

first I'd like to thank all of you working on Java support for GCC: it's
the reason my interest for Java has been able to start!

Second, I'm rather new to Java (and also "serious" programming in
general...), so I'm sorry if I ask trivial questions...

Now the problems :)
I'm testing gcj-3.3 (and gij) with classpath-0.6 on Debian (ppc and
i386) in order to use dvi2svg
(http://www.activemath.org/~adrianf/dvi2svg/): obviously :) it doesn't
work...

I'm trying to understand where the problems are: the first (and
hopefully the only...) is Jdom (http://www.jdom.org). In order to use
it, I tryed to download and compile the sources (have tryed first with
beta-8): it worked with these settings:

JAVA_HOME unset
LOCALCLASSPATH=./lib/ant.jar${PS}./lib/xml-apis.jar${PS}./lib/xerces.jar:
/usr/share/java/libgcj-3.3.2.jar:/usr/share/java/gnujaxp.jar
<property name="build.compiler" value="gcj"/> in build.xml for Ant

The build went successfully and now I'm trying to run a simple test for
Jdom: I added my jdom.jar to class path, run "gcj -C MyTest.java" and
then "gij MyTest". "MyTest.java" is:

========================================================================
import java.io.*;
import java.lang.String.*;

import org.jdom.*;
import org.jdom.input.*;

class First
{
public static void main (String argc [])
{
System.out.println ("First!");

Document doc;
SAXBuilder builder = new SAXBuilder (); 
}
}
========================================================================

When running, the output I get (on both architectures) is:

========================================================================
First!
Exception in thread "main" java.lang.VerifyError: verification failed at
PC 74 in
org.jdom.input.SAXBuilder:build((Lorg.xml.sax.InputSource;)Lorg.jdom.Document;): incompatible type on stack
   at _Jv_BytecodeVerifier.verify_fail(byte, int)
(/usr/lib/libgcj.so.4.0.0)
   at _Jv_BytecodeVerifier.verify_instructions_0()
(/usr/lib/libgcj.so.4.0.0)
   at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.4.0.0)
   at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.4.0.0)
   at java.lang.ClassLoader.linkClass0(java.lang.Class)
(/usr/lib/libgcj.so.4.0.0)
   at java.lang.ClassLoader.resolveClass0(java.lang.Class)
(/usr/lib/libgcj.so.4.0.0)
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.4.0.0)
   at First.main(java.lang.String[]) (Unknown Source)
=========================================================================

Am I missing something or is it a bug somewhere?
Thank you for any help!

Cheers,
Guido Amoruso



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