Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 May 2006 10:31:41 -0300
From:      Fernan Aguero <fernan@iib.unsam.edu.ar>
To:        Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc:        freebsd-java@freebsd.org
Subject:   Re: java without X11?
Message-ID:  <20060504133141.GD94022@iib.unsam.edu.ar>
In-Reply-To: <Pine.LNX.4.44.0605041710460.3451-100000@matrix.gatewaynet.com>
References:  <20060504123935.GB94022@iib.unsam.edu.ar> <Pine.LNX.4.44.0605041710460.3451-100000@matrix.gatewaynet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
+----[ Achilleus Mantzios <achill@matrix.gatewaynet.com> (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.

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060504133141.GD94022>