Re: Re: NoClassDefFoundError when call from native side
Eliot Moss <[email protected]> Sat, 03 May 2014 10:15:23 -0400
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
On 5/3/2014 9:48 AM, [email protected] wrote: > Thank you for the answer. > > It is right, there was a problem of binding with native methods when the > methods contains a certain kind of arguments. > > As suggested, I tested the code with a simple JNI hello-world example. All > works great with this example now (no more UnsatisfiedLinkError). > > Now when I try to run my graphical interface program, I still have the > NoClassDefFoundError, I think this is a classpath problem but I have no idea > how to debug and solve this.. > > Thank you. > > The error: > $ java -Xbootclasspath/a:TypeWrappers.jar -javaagent:agent.jar -jar float.jar > Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize > class sun.java2d.SunGraphics2D While I understand the NoClassDefFoundError usually means that the JVM literally could not find a class on the classpath, here it means that a class's static initializer failed. When that happens, the JVM has to declare the class unusable, and so it makes it unavailable for other code to use. It is therefore as *if* the class had not been found (as far as other code is concerned), but the real problem is with some static initializer or static code block in SunGraphics2D. (It is possible that some class needed there could not be found, but I think that the exception would have identified that other class.) Regards -- Eliot Moss
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws