public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/12857] New: Illegal method modifier when loading a generated .class
@ 2003-10-31 14:19 yves dot martin at elca dot ch
  2003-10-31 15:59 ` [Bug java/12857] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: yves dot martin at elca dot ch @ 2003-10-31 14:19 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12857

           Summary: Illegal method modifier when loading a generated .class
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: yves dot martin at elca dot ch
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: Linux
GCC target triplet: Java bytecode .class

I cannot describe why the .class is wrong - but I have extracted a simple test
case from a huge Java project:

public interface TestInterface {
  public static final String CONST = "My Class = " + 
      TestInterface.class.getName();
  public void aMethod();
}

public class TestCode implements TestInterface {
  public void aMethod() {
    return;
  }
  public static void main(String[] args) {
    System.out.println("Hello " + CONST);
  }
}

  gcj -C TestInterface.java
  gcj -C TestCode.java
  java -cp . TestCode
  The generated TestInterface.class is not loadable in Sun JVM:

Exception in thread "main" java.lang.ClassFormatError: TestInterface (Illegal
method modifiers: 0x8)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-11-18  4:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-31 14:19 [Bug java/12857] New: Illegal method modifier when loading a generated .class yves dot martin at elca dot ch
2003-10-31 15:59 ` [Bug java/12857] " pinskia at gcc dot gnu dot org
2003-11-03  1:50 ` jsturm at gcc dot gnu dot org
2003-11-14 11:04 ` aph at gcc dot gnu dot org
2003-11-15  5:29 ` jsturm at gcc dot gnu dot org
2003-11-18  3:57 ` cvs-commit at gcc dot gnu dot org
2003-11-18  4:07 ` jsturm at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).