From owner-freebsd-java@FreeBSD.ORG Fri May 5 16:32:25 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org 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 1A88616A403 for ; Fri, 5 May 2006 16:32:25 +0000 (UTC) (envelope-from scott@fishballoon.org) Received: from queue04-winn.ispmail.ntl.com (queue04-winn.ispmail.ntl.com [81.103.221.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C21743D45 for ; Fri, 5 May 2006 16:32:23 +0000 (GMT) (envelope-from scott@fishballoon.org) Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20060505161350.GYCF27969.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com>; Fri, 5 May 2006 17:13:50 +0100 Received: from llama.fishballoon.org ([81.101.128.185]) by aamtaout01-winn.ispmail.ntl.com with ESMTP id <20060505161350.TYBC19763.aamtaout01-winn.ispmail.ntl.com@llama.fishballoon.org>; Fri, 5 May 2006 17:13:50 +0100 Received: from scott by llama.fishballoon.org with local (Exim 4.61 (FreeBSD)) (envelope-from ) id 1Fc2w8-000PMC-53; Fri, 05 May 2006 17:13:48 +0100 Date: Fri, 5 May 2006 17:13:48 +0100 From: Scott Mitchell To: Fernan Aguero , freebsd-java@freebsd.org Message-ID: <20060505161347.GB94802@llama.fishballoon.org> References: <20060504121812.GA94022@iib.unsam.edu.ar> <20060504123935.GB94022@iib.unsam.edu.ar> <20060504214118.GA1072@tuatara.fishballoon.org> <20060505133535.GB12509@iib.unsam.edu.ar> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060505133535.GB12509@iib.unsam.edu.ar> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-SECURITY i386 Sender: Scott Mitchell Cc: Subject: Re: java without X11? X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 16:32:25 -0000 On Fri, May 05, 2006 at 10:35:35AM -0300, Fernan Aguero wrote: > +----[ Scott Mitchell (04.May.2006 18:45): > | > | The java binary in diablo-1.5.0_06 doesn't have a load-time dependency on > | libX11.so or any other X11 libraries, nor libawt.so - I guess the JVM will > | dlopen() libawt.so if it needs to do any graphical stuff. As proof of > | concept a simple "Hello, World" Java program compiles and runs just fine on > | a machine with no X11 libraries installed. I expect any program that > | didn't use AWT/Swing would work just as well. > > Great, that was what I was about to do once I could get > hands on this box. > > So, this means that I could safely ignore the warnings about missing > dependencies (upon package installation)? I believe so, as long as your Java program really doesn't need X11... > | Interestingly libawt.so doesn't have any direct X11 dependencies either, > | rather it depends on libmawt.so, of which several different versions exist, > | in the jre/lib/i386/{xawt,motif21,headless} directories. The xawt and > | motif21 versions depend on various X11 libraries, but the headless version > | does not. It looks like setting the java.awt.headless property to true or > | just having no $DISPLAY will cause the headless libraries to be used. You > | should be able to use AWT/Swing classes in any way that doesn't require > | access to a real display - so loading any manipulating images should work, > | but trying to say open a window will throw a HeadlessException. > OK, good to know. > > thanks for your reply, Glad I could help. Cheers, Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon