Results 1 to 3 of 3

Thread: How to point environ var to JDK?

  1. #1
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default 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
    Code:
    JAVA_HOME=foobarpath/jdkfoo/
    When I install a JDK from Sun, it's installed
    Code:
    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

  2. #2
    Join Date
    Jun 2008
    Location
    Sarasota
    Posts
    301

    Default Re: How to point environ var to JDK?

    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

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,305
    Blog Entries
    2

    Default Re: How to point environ var to JDK?

    Thx,
    That's really good to know.

    Haven't seen that posted anywhere else.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •