From owner-freebsd-java Thu Mar 6 7:41:31 2003 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B09AF37B401 for ; Thu, 6 Mar 2003 07:41:28 -0800 (PST) Received: from gddsn.org.cn (mail.gddsn.org.cn [210.21.6.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97F6A43FBD for ; Thu, 6 Mar 2003 07:41:27 -0800 (PST) (envelope-from hwh@gddsn.org.cn) Received: from gddsn.org.cn (gw [210.21.6.34]) by gddsn.org.cn (Postfix) with ESMTP id 06C0638CBA2; Thu, 6 Mar 2003 23:41:24 +0800 (CST) Message-ID: <3E676C23.60304@gddsn.org.cn> Date: Thu, 06 Mar 2003 23:41:23 +0800 From: Huang wen hui User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; zh-CN; rv:1.2.1) Gecko/20030226 X-Accept-Language: zh-cn, zh-tw, en-us MIME-Version: 1.0 To: Sheldon Hearn Cc: freebsd-java@FreeBSD.org Subject: Re: Native jdk1.4.1 JNI problem with Eclipse IDE References: <20030306090708.GY60356@starjuice.net> In-Reply-To: <20030306090708.GY60356@starjuice.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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.(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.(Device.java:107) > at org.eclipse.swt.widgets.Display.(Display.java:299) > at org.eclipse.swt.widgets.Display.(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