Subject: Re: sun-jdk15 and wireless toolkit v2.2
To: stefanos mparas <stefano@arx.net>
From: Brian de Alwis <bsd@cs.ubc.ca>
List: netbsd-java
Date: 06/20/2007 17:08:05
On 2007.06.20 15:08:59 -0600, Brian de Alwis wrote:
> So I suspect this problem has something to do with the directory
> layout resulting from installing sun-jdk15/sun-jre15.
Looking into this further, the problem is indeed caused by conflicts
in assumptions in the layouts by the WTK's compilation code.
* The WTK code assumes that the System property "java.home"
points to a JRE directory contained within a JDK directory,
and replaces the last with "/lib/tools.jar". This is true
for the pkgsrc-wip/jdk15 package and a manually installed
Linux JDK; it is not true for lang/sun-j{re,dk}15.
(See com.sun.kvem.ktools.ToolLoader defined in ktools.zip)
* The JVM computes "java.home" by finding the path to libjvm.so
and lopping off the last four '/'-delimited components.
Unfortunately the sun-jre15 package installs the libjvm.so in
/usr/pkg/java/sun-1.5/lib/<arch>/<vmtype>/libjvm.so.
So java.home=/usr/pkg/java/sun-1.5, and hence why lib/tools.jar
isn't found.
The solution is for sun-jre15 to preserve the layout of the JRE
when installing: replacing the jre directory with a symlink no
longer works. It's ugly, but unfortunately seems to have become
necessary.
Brian.
--
Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
"Amusement to an observing mind is study." - Benjamin Disraeli