How to point environ var to JDK?

Is important if I install multiple JDK and then need to point a compile to the appropriate JDK (not necessarily default)

A common example is

JAVA_HOME=foobarpath/jdkfoo/

When I install a JDK from Sun, it’s installed

into /usr/local/java/

But when I install a JDK from the SuSE repositories, I see various files installed into various bin directories.

What is the recommended path for instance if I install both JDK1.5 and JDK1.6?

TIA

There is an installed sub-system called “update-alternatives”
that handles this. See the man page ‘man update-alternatives’.

For example, execute the (root) cmd:
update-alternatives --config java
and you should see that java(s) are setup there, and you
can switch between them using this cmd.

Cheers…

Dave

Thx,
That’s really good to know.

Haven’t seen that posted anywhere else.