[OpenIndiana-discuss] Installing Java 7
Jim Klimov
jimklimov at cos.ru
Thu Dec 20 13:58:46 UTC 2012
On 2012-12-20 11:53, Andrew Myers wrote:
> Thanks Richard for your advice. This seems to have worked.
Also note that some programs (esp. system-bundled ones in Sun Solaris)
can rely on particular definition of JAVA_HOME env.var pointing to a
directory. Valid definition for the standard directory structure is
JAVA_HOME=/usr/java
which you update by updating the /usr/jdk/latest symlink.
Keep track of JVM customizations you might put in place, to redo them
upon upgrades (tzupdate, private CA certificates, etc.)
However, as with any software, some versions are better compatible
than others due to some intimacy between JVM and compiled programs,
so certain programs might require older JVM to stay around in the
path they expect to use (or reconfigure their path from default to
particular for such programs).
Finally, to help me install JDK from tarballs/selfextractors I have
packaged the Sun-standard dirs and symlinks to precreate the needed
structure. I attach a SVR4 for Solaris and a RPM for RHEL/CentOS.
In particular, this sticks needed symlinks to current installation
into /usr/bin. Feel free to use or integrate anyplace :)
A typical installation procedure looks like this:
:; gzcat $DOWNLOAD_DIR/COSjavadirs-1.6.0-1.pkg.gz > /tmp/x
:; pkgadd -d /tmp/x
:; cd /usr/jdk/instances
:; $DOWNLOAD_DIR/jdk-6u37-solaris-i586.sh
:; $DOWNLOAD_DIR/jdk-6u37-solaris-x64.sh
:; rm -f jdk1.6.0 && ln -s `ls -1d jdk1.6.0_* | tail -1` jdk1.6.0
(likewise for jdk1.7.*)
In this structure, /usr/jdk/instances/jdk1.6.0 points to the latest
jdk1.6.0_* installation, and /usr/jdk/latest statically points to
./instances/jdk1.6.0 (in our conservative case), and /usr/java points
to ./jdk/latest, and /usr/bin/java and an horde of other programs
point to ../java/bin/java etc.
HTH,
//Jim Klimov
More information about the OpenIndiana-discuss
mailing list