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]

Re: java.lang.reflect.Proxy support with native code?


Hi Andrew,

> > > In my progress of porting my existing code to gcj, I've run into some > > > problems with java.lang.reflect.Proxy.
> > > When running the compiled code I get a java.lang.NoClassDefFoundError > > > exception thrown for "$Proxy0"...
> > > Is there an issue with java.lang.reflect.Proxy when running natively > > > compiled code?
> > I've used it quite a lot with native code. Let's have simple test
> > case, and we'll see what happens.
> I've attached a simple example, and below is the outcome of executing:
I get
=== SNIP ===
with mainline on GNU/Linux on i686, so it looks like this may be a
port specific bug.
May be so, I'm afraid...

Try linking with -Wl,-whole-archive,-lgcj,-no-whole-archive.
That's actually solves the problem under both MinGW and Cygwin - great! Whatever they mean?

However, if I try that on target with "-static", I get an "Illegal Instruction" before anything else is even printed... There seems to be an error with my cross-compiler...

// Martin



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