Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 2009 11:20:22 -0500
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        Wayne Sierke <ws@au.dyndns.ws>
Cc:        Malcolm Kay <malcolm.kay@internode.on.net>, freebsd-java@freebsd.org
Subject:   Re: Why diablo-jdk?
Message-ID:  <20090813162022.GA86679@keira.kiwi-computer.com>
In-Reply-To: <1250149102.63923.1169.camel@predator-ii.buffyverse>
References:  <200908131302.06949.malcolm.kay@internode.on.net> <1250149102.63923.1169.camel@predator-ii.buffyverse>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 13, 2009 at 05:08:22PM +0930, Wayne Sierke wrote:
> On Thu, 2009-08-13 at 13:02 +0930, Malcolm Kay wrote:
> > It seems that many (if not most) posts to this list concern the 
> > Diablo version of jdk.
> > 
> > Is there some particular merit in using this in preference to the
> > regular FreeBSD port -- say jdk16?
> > 
> > Your comment is welcome,
> > Malcolm
> 
> I've been meaning to pose a related question.
> 
> Why is it that in /usr/ports/Mk/bsd.java.Mk java/diablo-jdk15 is
> preferred over java/jdk16? In fact the order of preference seems to be:
> diablo-jdk16, diablo-jdk15, openjdk6 then jdk16 ...

I believe it's because building the non-diablo JDKs takes a significant
amount of time and drive space.  Most people don't want the hassle of
compiling a JDK, especially since you need to bootstrap it with another
JDK.  It's a classic chicken and egg problem.  I think this way satisfies
more people.

The order that you specified seems to correct to me.

>         %java -version
>         java version "1.5.0"
>         Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01)
>         Java HotSpot(TM) Server VM (build diablo-1.5.0_07-b01, mixed mode)
> 
> and I must set JAVA_HOME or, as I have now done, add to /etc/make.conf:

If you don't want 1.5, why don't you install diablo-jdk16?  Or if you
want both installed, use JAVA_VERSION or JAVA_OS instead of JAVA_HOME.  As
you pointed out above, if you had installed diablo-jdk16, it would have
picked that over diablo-jdk15.

> Using textproc/fop recently with both port versions I've noticed that
> fop generally runs around 25% faster with java/jdk16.

Compared to diablo-jdk16?  That I'm not surprised.

> I also seem to recall having read statements to the effect that the
> java/diablo-jdk ports are "less functional" than the java/jdk ports
> making the preference given to the former all the more curious.

I think this is utter bull (not that you have read such statements, but
that such statements were based on truth)...

I use diablo 1.5 and 1.6 all the time, as well as the native jdk15 and
jdk16.  Recently I've been installing diablo just to bootstrap a native
jdk build.  I build the native JDKs myself because I want local variable
tables and line number tables (i.e. full debug builds) of JVM and
standard classes.  I also add a bunch of "missing" files from src.zip so
I can step through pretty much everything except JNI.  I've never
noticed any performance or functional difference between diablo and
natively-built JDKs and I've been using both for years.

My argument is for keeping the current order for choosing which port to
build.  However, the order they are chosen when running java is purely
defined by the order they appear in /usr/local/etc/javavms, which is the
order in which the JVMs were installed.  I would support someone writing a
knob to sort the VMs first by JAVA_OS then by JAVA_VERSION when registering
a new JVM.  It would be rather easy since the wrapper is a /bin/sh script.
See /usr/local/bin/javavm for details.

I look forward to seeing your patch to do this!  =)

-- Rick C. Petty



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