• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Solaris 11, package manager claims outdated java is latest, any workarounds?

taltamir

Lifer
I am using solaris 11, the GUI updater tool as well as the GUI package manager both insist that the latest version of java1.6 branch is u26 even though its current u33.

Is it just not available via package manager or is there a way to get it that I am missing? (aka, join a beta channel?)
 
Last edited:
I would much prefer to go through the package repository, also I don't care at all about browsers which is where the instructions focus. I need to run files and nothing there even comes close to mentioning how to make it the default OS java runtime.

Both the 1.6 and 1.7 branches on the package repository are from late 2011 so I switching to v1.7 doesn't solve the issue.
Regardless I need the latest 1.6 branch rather then the latest 1.7.

It will not allow me to uninstall existing JRE as other packages depend on it (some of which OS critical). I have also since confirmed that the latest versions are simply not available via the pkg.

To perform an actual upgrade you are supposed to manually "install" into the same directory as the package while overwriting files, and that's just so unclean (and I am sure will bite me in the ass on the next actual package update).

I have since found this page http://www.oracle.com/technetwork/java/javase/downloads/index.html
And installed the latest v1.6 u33 file and will test it soon. As it is, u26 is still the OS default so to run a program I type
$cd /programlocation/
PCName@/programlocation/$java -jar program.jar
it will run it off u26. I will need to replace the second line with:
PCName@/programlocation/$/usr/java/jre1.6.0_33/java -jar program.jar

BTW, the recommended default install location is /usr/java and it automatically creates the subfolder jre1.6.0_33

The install instructions are kinda weak so here is what you do.
1. Download the x86 and the x64 versions of 1.6u33 or 1.7u5 (you must install BOTH the x86 AND the x64 version if you have a AMD64 OS)
2. Default download directory is ~/Downloads/
3. Start terminal, go root.
4. #cd /usr/java
5. /usr/java#chmod -x ~/Downloads/<InstallerName>.sh
6. /usr/java#~/Downloads/<InstallerName>.sh
7. Repeat 5 and 6 for the other file (doesn't matter which order you install the 32bit and 64bit packages)
 
Last edited:
BTW, the recommended default install location is /usr/java and it automatically creates the subfolder jre1.6.0_33
That is similar to their Linux install. Version-specific subfolders allow co-existence of multiple versions. In Linux (rpm) there is a symlink /usr/java/default pointing to /usr/java/latest that is an another symlink pointing to actual version subfolder. Choosing default version is then easy, if the path contains one of those symlinks rather than hardcodes one version.

It is more than a bit worrying if Oracle Solaris repository lacks recent Oracle Java updates.
 
That is similar to their Linux install. Version-specific subfolders allow co-existence of multiple versions. In Linux (rpm) there is a symlink /usr/java/default pointing to /usr/java/latest that is an another symlink pointing to actual version subfolder. Choosing default version is then easy, if the path contains one of those symlinks rather than hardcodes one version.
that is smart. its also not what solaris does.

/usr/java is a symlink pointing at /usr/jdk/jdk1.6.0_26 which itself is a symlink pointing at /usr/jdk/instances/jdk1.6.0
(yes, they symlinked a symlink; retarded! also with horrible naming and directory structure and it serves absolutely no purpose since the specific subversion just points at the shared directory)

Solaris comes with jre 1.5.0 and 1.6.0, although you can install 1.7.0 as well via repository (an old version from 2011 that is).
All appear under /usr/jdk/instances/jdk1.#.0/jre/
When upgrading within a major version (aka, going from 1.6.0u## to u26) it simply deletes the old one and replaces it with a new one.

The instruction to install jre into /usr/java is just stupid as this means that it really installed into /usr/jdk/instances/jdk1.6.0/jre1.6.0_33 for v1.6 and /usr/jdk/instances/jdk1.6.0/jre1.7.0_5 for v1.7

Since the default java runtime is probably "/usr/java/jre/java" it means that there is no simple & easy way to install a new default.

I think the best way to properly install it is into:
/usr/sdk/instances/jdk1.6.0_33
then make a symlink at:
/usr/sdk/instances/jdk1.6.0_33/jre
pointing at:
/usr/sdk/instances/jdk1.6.0_33/jre1.6.0_33

Optionally, to make it the default OS java version used for other programs modify the symlink
/usr/java
to point at
/usr/sdk/instances/jdk1.6.0_33/
Ignore the symlink at
/usr/jdk/jdk1.6.0_26

And keep in mind that when they do finally upgrade java, it will probably mess this neat directory structure all to hell. Also hope the OS still boots properly with such a change...

Or skip the step where modifying /usr/java symlink and just manually use the latest java version when needed and let the OS do its own thing with its built in versions.

It is more than a bit worrying if Oracle Solaris repository lacks recent Oracle Java updates.
Yes, it is.
 
Last edited:
Back
Top