From owner-freebsd-gecko@FreeBSD.ORG Thu Sep 9 19:00:39 2010 Return-Path: Delivered-To: gecko@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 366BA10656C7; Thu, 9 Sep 2010 19:00:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Thu, 9 Sep 2010 15:00:08 -0400 User-Agent: KMail/1.6.2 References: <4C890E19.1040808@FreeBSD.org> In-Reply-To: <4C890E19.1040808@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201009091500.15935.jkim@FreeBSD.org> Cc: gecko , Beat Gaetzi Subject: Re: Request for help: OpenJDK6 IcedTea Java plugin X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2010 19:00:39 -0000 On Thursday 09 September 2010 12:40 pm, Beat Gaetzi wrote: > Hi, > > Due to a lot of user request I've started working on a port for the > OpenJDK6 IcedTea Java plugin which works with Firefox 3.6. As I > never used the Java plugin and I'm not very experienced in the Java > world I need some help. > > Some parts of the port are taken from java/openjdk6 and pkgsrc. The > shar file of the current port is available here: > http://people.freebsd.org/~beat/patches/icedtea6-plugin.shar > > I've tested the port on FreeBSD 8.1 amd64 and i386. The plugin was > recognized after creating a symlink in ~/.mozilla/plugins/: > # ln -s /usr/local/lib/netscape/plugins/IcedTeaPlugin.so > ~/.mozilla/plugins/ > > Screenshot of about:plugins in Firefox 3.6: > http://tmp.chruetertee.ch/firefox-icedtea.png > > When I tried to watch a Java applet the browser crashed: > > Exception in thread "main" java.lang.IllegalAccessError: tried to > access class sun.applet.AppletMessageHandler from class > sun.applet.PluginAppletViewer > at > sun.applet.PluginAppletViewer.(PluginAppletViewer.java:2163 >) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstru >ctorAccessorImpl.java:57) at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegatin >gConstructorAccessorImpl.java:45) at > java.lang.reflect.Constructor.newInstance(Constructor.java:532) at > java.lang.Class.newInstance0(Class.java:372) > at java.lang.Class.newInstance(Class.java:325) > at > sun.applet.PluginStreamHandler.(PluginStreamHandler.java:85) > at sun.applet.PluginMain.connect(PluginMain.java:155) > at sun.applet.PluginMain.(PluginMain.java:137) > at sun.applet.PluginMain.main(PluginMain.java:116) > > So I copied the content of > www/icedtea6-plugin/work/icedtea6-1.8/liveconnect to > /usr/local/lib/netscape/plugins/ (This step isn't done by the port > yet as I don't know if this is the correct location) set the > CLASSPATH environment variable but it crashed again: > > # mv /usr/ports/www/icedtea6-plugin/work/icedtea6-1.8/liveconnect/* > /usr/local/lib/netscape/plugins/ > # setenv CLASSPATH /usr/local/lib/netscape/plugins/ > # firefox3 > openjdk version "1.6.0" > OpenJDK Runtime Environment (build 1.6.0-b20) > OpenJDK Client VM (build 17.0-b16, mixed mode) > Exception in thread "main" java.lang.IllegalAccessError: tried to > access class sun.applet.AppletMessageHandler from class > sun.applet.PluginAppletViewer > at > sun.applet.PluginAppletViewer.(PluginAppletViewer.java:2163 >) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstru >ctorAccessorImpl.java:57) at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delegatin >gConstructorAccessorImpl.java:45) at > java.lang.reflect.Constructor.newInstance(Constructor.java:532) at > java.lang.Class.newInstance0(Class.java:372) > at java.lang.Class.newInstance(Class.java:325) > at > sun.applet.PluginStreamHandler.(PluginStreamHandler.java:85) > at sun.applet.PluginMain.connect(PluginMain.java:155) > at sun.applet.PluginMain.(PluginMain.java:137) > at sun.applet.PluginMain.main(PluginMain.java:116) > > Does anyone knows how to fix this problem? > > There are also some parts (marked with a comment) in the port > makefile which needs some review or improvement. Wow, I was working on it, too. And I was going to announce it today when I am done cleaning up the ports. :-) You can see some screenshots of mine from here: http://people.freebsd.org/~jkim/icedtea/screenshots/ FYI, you have to apply few patches from IcedTea6 distribution, i.e., patches/extensions/*.patch. Specifically, you have to patch Java Runtime to make NetX working with OpenJDK6. Please see netx.patch. Jung-uk Kim