bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java-related Bison tests all fail


From: Bruno Haible
Subject: Re: Java-related Bison tests all fail
Date: Sun, 11 Feb 2007 00:15:02 +0100
User-agent: KMail/1.5.4

Joel E. Denny wrote:
> > ============================= conftestver.java =============================
> > public class conftestver {
> >   public static void main (String[] args) {
> >     System.out.println(System.getProperty("java.specification.version"));
> >   }
> > }
> > ============================================================================
> 
> It prints:
> 
>   1.4

OK, this is as expected for a gij-4.[012].x.

> As far as I can tell, conftestver.class is created by an echo in 
> javacomp.m4.  When using gt_JAVACOMP([1.3]) in configure.ac, this passage 
> appears in config.log:
> 
>   configure:18697: checking for Java virtual machine
>   configure:18747: found /usr/local/bin/gij
>   configure:18781: found /usr/lib/java/bin/java
>   configure:18904: result: gij
>   configure:18957: CLASSPATH=. gij conftestver
>   Exception in thread "main" java.lang.ClassFormatError: conftestver (bad 
> magic number)
>      at java.lang.VMClassLoader.defineClass (natVMClassLoader.cc:77)
>      at java.lang.ClassLoader.defineClass (ClassLoader.java:449)
>      at java.security.SecureClassLoader.defineClass 
> (SecureClassLoader.java:108)
>      at java.net.URLClassLoader.findClass (URLClassLoader.java:1166)
>      at java.lang.ClassLoader.loadClass (ClassLoader.java:317)
>      at java.lang.ClassLoader.loadClass (ClassLoader.java:260)
>      at java.lang.Class.forName (natClass.cc:88)
>      at gnu.java.lang.MainThread.run (MainThread.java:95)

Ouch. The class that I put into this javacomp.m4 is in Java 1.1 format; it
should be acceptable to any Java VM. Maybe something is wrong with the
echo or tr commands? Can you compare the generated conftestver.class with
the one I get (attached)?

Bruno

Attachment: conftestver.class
Description: application/java


reply via email to

[Prev in Thread] Current Thread [Next in Thread]