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]

gcj bug


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 ());
  }
}


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