gij-4.1 \ -classpath build/bootstrap/ecj.jar:/usr/share/ant/lib/ant.jar \ org.eclipse.jdt.internal.compiler.batch.Main \ -bootclasspath /usr/share/java/libgcj-4.1.jar \ build/bin Exception in thread "main" java.lang.NullPointerException at java.lang.ClassLoader.defineClass (ClassLoader.java:451) 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) make: *** [build/stamp] Error 1 >>>>> "Martin" == Martin Michlmayr <tbm@cyrius.com> writes: Hmm. We probably ought to throw a different exception here. Would you mind filing a bug for this? Martin> Exception in thread "main" java.lang.NullPointerException Martin> at java.lang.ClassLoader.defineClass (ClassLoader.java:451) What this most likely means is that there is an attempt to define a class from bytecode, and the attempt failed. Looking at libjava/configure.host, I see that the interpreter is not enabled for the MIPS port. So, an exception here is to be expected. [testing the latter, just the bug report for the NullPointerException]
It isn't clear what exception we ought to throw here. What is happening is that we've found a .class file for a class we're searching for, but libgcj is not configured to properly handle class files. VirtualMachineError would be ok from a spec. point of view. But it is a bit unfriendly. This is what I'm leaning toward. ClassFormatError would also be legal but it is a bit of a lie.
Subject: Bug 27294 Author: tromey Date: Fri May 5 15:05:20 2006 New Revision: 113554 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113554 Log: PR libgcj/27294: * java/lang/natVMClassLoader.cc (defineClass): Throw VirtualMachineError if no interpreter configured. Modified: trunk/libjava/ChangeLog trunk/libjava/java/lang/natVMClassLoader.cc
Now we print something nicer: opsy. gij t Exception in thread "main" java.lang.VirtualMachineError: found class file for class t, but no interpreter configured in this libgcj