gcj bug

Tom Tromey tromey@redhat.com
Thu Aug 23 15:44:00 GMT 2001


Compile the appended program with `gcj -C'.
Notice how it fails.
Then compile with javac and see it succeed.

creche. gcj -C bar.java 
creche. gij bar
[B
class [B
Aborted
creche. java bar
[B
class [B
Exception in thread "main" java.lang.NoClassDefFoundError: [Ljava/lang/String;
	at bar.class$(bar.java)
	at bar.main(bar.java:8)
creche. javac bar.java 
creche. gij bar
[B
class [B
[Ljava.lang.String;
class [Ljava.lang.String;
creche. java bar
[B
class [B
[Ljava.lang.String;
class [Ljava.lang.String;


Tom

public class bar
{
  public static void main (String[] args)
  {
	Class k2 = byte[].class;
	System.out.println (k2.getName ());
	System.out.println (k2.toString ());
	k2 = String[].class;
	System.out.println (k2.getName ());
	System.out.println (k2.toString ());
  }
}



More information about the Java mailing list