Date: Thu, 06 Mar 2003 23:41:23 +0800 From: Huang wen hui <hwh@gddsn.org.cn> To: Sheldon Hearn <sheldonh@starjuice.net> Cc: freebsd-java@FreeBSD.org Subject: Re: Native jdk1.4.1 JNI problem with Eclipse IDE Message-ID: <3E676C23.60304@gddsn.org.cn> In-Reply-To: <20030306090708.GY60356@starjuice.net> References: <20030306090708.GY60356@starjuice.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Sheldon Hearn wrote: >Hi folks, > >Wow! The native jdk1.4.1_p3 labour of love has produced something quite >amazing. Performance-wise, this thing kicks butt with respect to >jdk1.3.1_pre8, and it seems as stable as I need it to be. > >It seems, however, that there may be a problem with its JNI. > >I've been in contact with James Flemer, who is maintaining a native >Eclipse port outside the FreeBSD ports tree. I intend to commit that >port once it works for me with our native jdk1.4.1_pX. > >When built and run from James' port with jdk1.3.1_p8, Eclipse works >brilliantly. When built and run from James' port with jdk1.4.1_p3, >Eclipse fails to start, throwing a java.lang.UnsatisfiedLinkError >exception. > >I don't have any problems with NetBeans (other than personal disgust), >but then it doesn't use JNI (as far as I can tell). > >The port tarball used to build Eclipse with jdk1.4.1_p3 is attached as >eclipse-gtk.tgz. > >Note that you have to edit USE_JAVA, setting it to 1.4 or 1.4+. This >requires a patch to bsd.java.mk, which I've also attached. > >Launching eclipse results in a controlled crash, leaving the following >output in its logfile (~/workspace/.metadata/.log): > >!SESSION ---------------------------------------------------------------------- >!ENTRY org.eclipse.core.launcher 4 0 Mar 06, 2003 02:28:58.134 >!MESSAGE Exception launching the Eclipse Platform: >!STACK >java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at org.eclipse.core.launcher.Main.basicRun(Main.java:247) > at org.eclipse.core.launcher.Main.run(Main.java:703) > at org.eclipse.core.launcher.Main.main(Main.java:539) >Caused by: java.lang.reflect.InvocationTargetException > at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:848) > at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) > ... 7 more >Caused by: java.lang.UnsatisfiedLinkError: /usr/local/eclipse-gtk/plugins/org.eclipse.swt.gtk/os/linux/x86/libswt-pi-gtk-2130.so: /usr/local/eclipse-gtk/plugins/org.eclipse.swt.gtk/os/linux/x86/libswt-pi-gtk-2130.so: Undefined symbol "main" > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473) > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1381) > at java.lang.Runtime.loadLibrary0(Runtime.java:788) > at java.lang.System.loadLibrary(System.java:832) > at org.eclipse.swt.internal.Library.loadLibrary(Library.java:104) > at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:19) > at org.eclipse.swt.widgets.Display.createDisplay(Display.java:443) > at org.eclipse.swt.widgets.Display.create(Display.java:430) > at org.eclipse.swt.graphics.Device.<init>(Device.java:107) > at org.eclipse.swt.widgets.Display.<init>(Display.java:299) > at org.eclipse.swt.widgets.Display.<init>(Display.java:295) > at org.eclipse.ui.internal.Workbench.run(Workbench.java:1230) > at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) > ... 8 more > >I tried to get into this with jdb, but alas, it was not to be. I start >the process with > >$ /usr/local/jdk1.4.1/bin/jdb \ > -Xdebug -Xnoagent \ > -Xrunjdwp:transport=dt_socket,address=2112,server=y,suspend=y \ > -classpath \ > /usr/local/eclipse-gtk/startup.jar \ > org.eclipse.core.launcher.Main \ > -os linux -ws gtk -arch x86 > >but when I attach to it with the debugger and "run", ktrace just shows >the process spinning on poll() and gettimeofday(). > >So now I'm out of my depth. Actually, I was out of my depth a few >paragraphs ago. Any ideas? :-) > >Ciao, >Sheldon. > > I make FreeBSD-Motif port(build -os FreeBSD -ws Motif) for Eclipse RC1(eclipse-sourceBuild-srcIncluded-RC1.zip) recently. and also use jdk1.4.1-pre_p3. I did not have this problem. --hwh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E676C23.60304>