This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcj bug
- To: Java Discuss List <java at gcc dot gnu dot org>
- Subject: gcj bug
- From: Tom Tromey <tromey at redhat dot com>
- Date: 23 Aug 2001 17:18:23 -0600
- Cc: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Reply-To: tromey at redhat dot com
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 ());
}
}