[Bug libgcj/20508] New: gij prints too much information if an incorrect class is given
mckinlay at redhat dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 17 02:22:00 GMT 2005
When the name of a non-existant class is given to gij, the error given is far
too verbose:
$ gij Blah
Exception in thread "main" java.lang.NoClassDefFoundError: Blah
at gnu.java.lang.MainThread.run (MainThread.java:98)
Caused by: java.lang.ClassNotFoundException: Blah not found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
parent=gnu.gcj.runtime.VMClassLoader{urls=[core:/], parent=null}}
at java.net.URLClassLoader.findClass (URLClassLoader.java:923)
at java.lang.ClassLoader.loadClass (ClassLoader.java:309)
at java.lang.Class.forName (natClass.cc:88)
at gnu.java.lang.MainThread.run (MainThread.java:94)
This is a lot more information than the user needs. Compare this with Sun's VM:
$ java Blah
Exception in thread "main" java.lang.NoClassDefFoundError: Blah
We should not wrap the ClassNotFoundException in MainThread.run, and the stack
trace code should supress stack trace printing when main() has not yet been
called (or, at least, for this special case - when the exception is thrown from
MainThread.run).
--
Summary: gij prints too much information if an incorrect class is
given
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mckinlay at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20508
More information about the Gcc-bugs
mailing list