Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Java installation for Solaris Studio 12.2

Writer Matthew Harrington

I have Solaris Studio almost working. My only issue seems to be Java.

Here is what I get:

============================

aflory@aflory-laptop:~$ solstudio &
[1] 1723
aflory@aflory-laptop:~$ Solaris Studio is unable to find a supported version of Java.
Solaris Studio supports Java version 1.6.0_13 and newer and looks for a valid Java installation in the following order:
1) Location specified with --jdkhome command line option
2) In PATH environment variable
3) At /usr/jdk/latest location, if exists
4) At /usr/java location, if exists
5) At /usr location, if exists

============================

I try typing --jdkhome in the console but I get an command not found error.

I have added the following to my /home/aflory/.bashrc file:

PATH=$PATH:/usr/java/jdk1.6.0_24/bin:/home/aflory/solstudio12.2/bin
export PATH

I am running Ubuntu 10.04 64bit.

I tried installing the 64 bit version of Java JDK, then I tried installing the 32bit version of Java JDK.

I don't believe there is a 64bit version of Solaris Studio.

1 Answer

The error message (and the manpage) suggests running the command with the "--jdkhome" option, passing in the JDK installation directory as the argument; e.g.,

$ solstudio --jdkhome /usr/java/jdk1.6.0_24/

You might also try setting JAVA_HOME, a commonly used env var to designate your preferred Java installation directory, used by various tools. (It's a convention, not a requirement.) This simplifies upgrades of your JRE/JDK.

(Even better, set a symlink from /usr/java/latest to /usr/java/{your_jdk}, and set JAVA_HOME to /usr/java/latest... but I'll leave that as an exercise for the reader. If you have the "alternatives" (or galternatives) package available & installed, just use that....)

For example:

Set it...

prompt> export JAVA_HOME=/usr/java/jdk1.6.0_24

Test it...

prompt> $JAVA_HOME/bin/java -version

Use it...

prompt> solstudio --jdkhome $JAVA_HOME

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy