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]

An interesting bug


public class foo
{
  public static void main (String[] argv) throws Throwable {
    Class c = Class.forName ("[Ljava.lang.String;");
    System.out.println (c);
    c = ClassLoader.getSystemClassLoader().loadClass ("[Ljava.lang.String;");
    System.out.println (c);
  }
}

on IBM's Java library, returns

class [Ljava.lang.String;
class [Ljava.lang.String;

on gcj, returns

class [Ljava.lang.String;
Exception in thread "main" java.lang.ClassNotFoundException: [Ljava.lang.String; 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.ClassLoader.loadClass (ClassLoader.java:260)
   at foo.main (a.out)

I'm working on it.

Andrew.


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