From owner-freebsd-ports@FreeBSD.ORG Tue Oct 11 03:54:42 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86F1916A41F for ; Tue, 11 Oct 2005 03:54:42 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (glewis.dsl.xmission.com [166.70.56.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDE9D43D45 for ; Tue, 11 Oct 2005 03:54:41 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.3/8.13.3) with ESMTP id j9B3sOaB096673; Mon, 10 Oct 2005 21:54:24 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.3/8.13.3/Submit) id j9B3sMMj096672; Mon, 10 Oct 2005 21:54:22 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Mon, 10 Oct 2005 21:54:22 -0600 From: Greg Lewis To: Mike Hunter Message-ID: <20051011035422.GA96547@misty.eyesbeyond.com> References: <20050928194514.GA20631@misty.eyesbeyond.com> <20051001001910.GA37857@malcolm.berkeley.edu> <20051003154132.GA52761@misty.eyesbeyond.com> <20051004002656.GA4713@malcolm.berkeley.edu> <20051004041642.GA58118@misty.eyesbeyond.com> <20051007010554.GA4594@malcolm.berkeley.edu> <20051010205713.GA18010@malcolm.berkeley.edu> <434AD846.8080808@ebs.gr> <20051010211440.GA94252@misty.eyesbeyond.com> <20051010222516.GA20433@malcolm.berkeley.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <20051010222516.GA20433@malcolm.berkeley.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-ports@freebsd.org, Panagiotis Astithas Subject: Re: [solved] Re: Java (jdk1.5) woes with firefox (1.0.6) and opera (8.5) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Oct 2005 03:54:42 -0000 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Mike, On Mon, Oct 10, 2005 at 03:25:16PM -0700, Mike Hunter wrote: > On Oct 10, "Greg Lewis" wrote: > > On Tue, Oct 11, 2005 at 12:08:22AM +0300, Panagiotis Astithas wrote: > > > Mike Hunter wrote: > > > >After learning a bit about freebsd package management, I figured out how to > > > >upgrade to the latest Xorg (and make sure I'm actually using it :) ): > > > > > > > >xdpyinfo | grep -i ersi > > > >version number: 11.0 > > > >X.Org version: 6.8.2 > > > > > > > >But I'm still plagued with the same crash. Is there any chance that the > > > >java vm is using an old libawt or something like that? > > > > > > > >Thanks for all the help so far and I appreciate whatever else anybody has > > > >to offer :) > > > > > > You might want to try rebuilding the jdk with the recent patches on > > > freebsd-java to use the XToolkit AWT implementation instead of the > > > MToolkit one. Since the crash you originally mentioned involves libmawt, > > > that seems like a reasonable thing to do. > > > > > > On second thought, you don't even need to rebuild jdk15. Just do as > > > instructed here: > > > > > > http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html > > > > That was going to be my next suggestion :). As Panagiotis said, just > > read that page and look at the environment variables you need to set > > to try the XToolkit with an applet. Hopefully that helps, since I'm fast > > running out of ideas! > > Thanks everybody, it's working. After I stopped misinterpreting the > instructions ("export AWT_TOOLKIT=XToolkit", is the *opposite* of > "export AWT_TOOLKIT=MToolkit"), the applet comes up quickly and the > graphics are fine. The fact that the applet subsequently causes the > java vm to take 99% CPU and has to be killed is only a slight downer at > this point :| > > I pointed my browser at other sites with applets and they seem to work > fine. Is there any favorite site with a simple applet people use to check > if their java plugin stuff is working? I stumbled across yale's "ssh > applet" and it seemed to work well.... Great to hear thats its running now (at least to some extent :). Thanks for your effort in eliminating all the other possibilities! I usually check if the plugin is working correctly by using some of the applets you can find in /usr/local/jdk1.5.0/demo/applets. There are also applet versions of SwingSet2 and Java2D installed in the demo/jfc subdirectories that you can try. The attached two patches should make XToolkit the default (they were recently posted to freebsd-java). If you or someone else who had the same problem could recompile jdk15 with them and verify that you then don't need to set the environment variable that would be great. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org --WIyZ46R2i8wDzkSu Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch-j2se::awt::Toolkit.java" $FreeBSD$ --- ../../j2se/src/share/classes/java/awt/Toolkit.java 10 Jan 2005 07:40:41 -0000 1.2 +++ ../../j2se/src/share/classes/java/awt/Toolkit.java 9 Oct 2005 04:11:13 -0000 @@ -809,12 +809,11 @@ try { String defaultToolkit; - /* XXXBSD: analyze and choose better one */ - if (System.getProperty("os.name").equals("Linux")) { - defaultToolkit = "sun.awt.X11.XToolkit"; + if (System.getProperty("os.name").equals("SunOS")) { + defaultToolkit = "sun.awt.motif.MToolkit"; } else { - defaultToolkit = "sun.awt.motif.MToolkit"; + defaultToolkit = "sun.awt.X11.XToolkit"; } nm = System.getProperty("awt.toolkit", defaultToolkit); --WIyZ46R2i8wDzkSu Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch-j2se::awt::awt_LoadLibrary.c" $FreeBSD$ --- ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c 10 Jan 2005 15:09:40 -0000 1.2 +++ ../../j2se/src/solaris/native/sun/awt/awt_LoadLibrary.c 9 Oct 2005 05:34:52 -0000 @@ -195,8 +195,7 @@ } } else { -/* XXXBSD: decide which toolkit to use */ -#if defined(__linux) +#if defined(__linux) || defined(_ALLBSD_SOURCE) /* Default AWT Toolkit on Linux is XAWT. */ strcpy(p, "/xawt/libmawt"); XAWT = 1; --WIyZ46R2i8wDzkSu--