From owner-freebsd-java@FreeBSD.ORG Thu May 4 13:53:29 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 1910216A446 for ; Thu, 4 May 2006 13:53:29 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from matrix.gatewaynet.com (host2.dynacom.ondsl.gr [62.103.35.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E2E843D6D for ; Thu, 4 May 2006 13:53:27 +0000 (GMT) (envelope-from achill@matrix.gatewaynet.com) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id k44F2hOp003643; Thu, 4 May 2006 18:02:43 +0300 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id k44F2hCd003639; Thu, 4 May 2006 18:02:43 +0300 Date: Thu, 4 May 2006 18:02:43 +0300 (EEST) From: Achilleus Mantzios To: Fernan Aguero In-Reply-To: <20060504133141.GD94022@iib.unsam.edu.ar> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT Cc: freebsd-java@freebsd.org 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: Thu, 04 May 2006 13:53:29 -0000 O Fernan Aguero Ýãñáøå óôéò May 4, 2006 : > +----[ Achilleus Mantzios (04.May.2006 10:12): > | > > [snipped] > > | > | I know that a lot of java apps depend on GUI functionality > | > | provided by the language, but is this java+X11 a thing that > | > | cannot be separated? (i.e. X11 is rooted too deep into > | > | java) or maybe it could be separated and we could have an > | > | optional WITHOUT_X11 in the various jdk ports? > | > > | > Now replying to myself. After a couple of google searches, > | > it seems like yes, X11 (at least before jdk15) was too tied > | > to java. > | > | My previous message regraded jdk 1.4.2, i havent checked with jdk 1.5. > | (sorry) > > It's OK. > > | > The following, however, suggests that jdk15 can be run in > | > headless boxes without X11, even when there is java code > | > that generates and/or works with graphics > | > http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=481#612 > | > > | > | They (eteks) produce a product just for that use. > | I had checked it out back in 1.3 days. > | The problem then was not X11 installation itself but the fact that > | a X11 server was needed in order to use AWT > | (java wanted to connect to an X DISPLAY). > | At the time, the workaround for headless servers was to use > | Xvfb (virtual frame buffer). > > Yes, this is what I understood from reading this and other > pages. > > | But today (1.4.2, 1.5) we dont have to bother with such issues > | any more. > | I'd recommend installing xorg-libraries and then use the > | -Djava.awt.headless=true switch. > > >From the limited understanding I got in the last half-hour > from Google :) this might be true for 1.4.2 but not for 1.5 > > Quoting from the URL above: > "... servlets using only PJA classes and servlets relying on > standard images classes of the JDK work without setting any > System property" and just next it adds "from J2SE 5.0, you > don't even have to set java.awt.headless property to ensure > such servlets work". > > And I'm not even planning on generating graphics ... > > | Keeping X11-libraries updated adds some admin cost, but > | i dont think its a big issue. > > Of course, I agree it's not a big issue, it's just that > being completely naïve (not knowing anything on the subject) > I just found it natural that java would not need X11. > > | > I'm not a java expert at all, just a consumer of java tools, > | > so I can't really think of helping with a non-X11 jdk15 ... but > | > maybe I can push this on the freebsd-java agenda :) ? > > [signatures snipped] > > | > | -- > | -Achilleus > | > +----] > > OK, so what if I just go ahead and remove all X11 stuff from > this box? Apart from testing java code from my specific > application, are there any java tests that I can run to > ensure that everything would run smoothly? I mean, I can > just keep the X11 libraries, it's no big deal as I said > above, I'm proposing this as a test to see if a headless > FreeBSD jdk15 port is a viable option. As a simple test would convince you, just removing a dependent .so file, would prevent you from running *any* java app. > > I know Perl includes a comprehensive testbed that you can > run to check a myriad of things ... but I'm not that > familiar with Java ... > > Regards, > > Fernan > -- -Achilleus