Java update location

Discussion in 'Java' started by Monty, Oct 24, 2007.

  1. Monty

    Monty Guest

    I hope this is the correct forum for this. Please point me in the
    right direction if it's not.

    I recently downloaded the latest Java runtime enviroment from Sun for
    Solaris 8. Running the script creates an update directory, but where
    does this directory go? Is this something that can exist anywhere as
    long as it's linked to the original installation?

    Thanks
     
    Monty, Oct 24, 2007
    #1
    1. Advertising

  2. Monty

    Roedy Green Guest

    On Wed, 24 Oct 2007 13:57:06 -0000, Monty <>
    wrote, quoted or indirectly quoted someone who said :

    >I recently downloaded the latest Java runtime enviroment from Sun for
    >Solaris 8. Running the script creates an update directory, but where
    >does this directory go? Is this something that can exist anywhere as
    >long as it's linked to the original installation?


    see
    http://java.sun.com/javase/6/webnotes/install/jre/install-solaris.html

    If you plan to write programs, not just run them, you will need the
    JDK.
    see http://mindprod.com/jgloss/jdk.html
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Oct 25, 2007
    #2
    1. Advertising

  3. Monty

    Monty Guest

    Thanks, I had seen those directions and followed them, but I guess my
    understanding of the Java directory sturcture is in question. Having
    run the installation script, I see it creates a directory called
    jre1.6.0_03 in whatever directory I run the script. It appears to
    have a very similar structure to a directory named jre in our Java
    installation directory (/usr/java1.2). Do I link that jre directory
    to the new jre1.6.0_03 directory?

    Thanks
     
    Monty, Oct 30, 2007
    #3
  4. Monty

    Lew Guest

    Monty wrote:
    > Thanks, I had seen those directions and followed them, but I guess my
    > understanding of the Java directory sturcture is in question. Having
    > run the installation script, I see it creates a directory called
    > jre1.6.0_03 in whatever directory I run the script. It appears to
    > have a very similar structure to a directory named jre in our Java
    > installation directory (/usr/java1.2). Do I link that jre directory
    > to the new jre1.6.0_03 directory?


    You apparently have a UNIX-like environment, such as BSD, Linux or Solaris,
    correct?

    Let's say you have a standard location to root all your Java installations. I
    use /opt/java/ here. Apparently it's /usr/ at your location. Let's just
    pretend that we have an envar JAVA_PARENT for that directory. In my case,
    using bash I'd

    $ export JAVA_PARENT=/opt/java

    (You don't actually need this envar, of course, it just makes things easier to
    talk about on Usenet.)

    Unpack or copy your jre1.6.0_03 to $JAVA_PARENT. In your case you now have
    two subdirectories:

    $JAVA_PARENT/java1.2
    $JAVA_PARENT/jre1.6.0_03

    Now point JRE_HOME to the correct one, modify your PATH to use the correct
    bin/ subdirectory of that one, and away you go.

    Another way is to symbolically link your correct version of Java to, say,
    $JAVA_PARENT/java. Then all things Javaesque can use
    JRE_HOME=$JAVA_PARENT/java, and all you have to do is update the symbolic link
    when you change versions.

    The popular 'alternatives' mechanism can help you manage multiple versions of
    the same service. Here's what I have:

    # /usr/sbin/alternatives --display jdk
    jdk - status is auto.
    link currently points to /opt/java/jdk1.6.0_03-32
    /opt/java/jdk1.5.0_13 - priority 1513
    slave jre: /opt/java/jdk1.5.0_13/jre
    /opt/java/jdk1.6.0_03 - priority 1600
    slave jre: /opt/java/jdk1.6.0_03/jre
    /opt/java/jdk1.6.0_03-32 - priority 1603
    slave jre: /opt/java/jdk1.6.0_03-32/jre
    Current `best' version is /opt/java/jdk1.6.0_03-32.

    I use 'alternatives' to set up my symbolic link to /usr/java/java, which
    currently points to the `best' version: /opt/java/jdk1.6.0_03-32.

    $ echo $JAVA_HOME
    /usr/java/java

    $ echo $JRE_HOME
    /usr/java/java/jre

    (Aside: /usr and /opt are on separate hard drives. I find /usr more "natural"
    as a location for things like JAVA_HOME, but I use /opt for large things.
    Through the magic of the "ln -s" performed by 'alternatives', I have the best
    of both.)

    --
    Lew
     
    Lew, Oct 31, 2007
    #4
  5. Monty

    Roedy Green Guest

    Roedy Green, Oct 31, 2007
    #5
  6. Lew wrote:
    >
    > (Aside: /usr and /opt are on separate hard drives. I find /usr more
    > "natural" as a location for things like JAVA_HOME, but I use /opt for
    > large things. Through the magic of the "ln -s" performed by
    > 'alternatives', I have the best of both.)
    >

    I add one extra tweak to that: I've replaced /usr/java with a symlink
    pointing to /home/java and done the same with /usr/local and /home is a
    separate partition.

    This way upgrades are dead simple: I reformat everything except the
    /home partition and do the install. This leaves me with an empty
    /usr/local tree and no java. To put things back as they were I only have
    to delete /usr/local and put the java and local symlinks back in /usr.

    Then all(!) I have left to do is drop my custom config files back into
    /etc and put the DNS stuff back in /var. Copies of these are held in
    /home as you might expect.



    --
    martin@ | Martin Gregorie
    gregorie. | Essex, UK
    org |
     
    Martin Gregorie, Oct 31, 2007
    #6
  7. Monty

    Monty Guest

    I relinked the /usr/java1.2 directory to /usr/jre1.6.0_03 and it
    worked for the most usual things we use. It doesn't work, however,
    for the application I installed it for, which tells me the problem
    lies elsewhere and not in the version.

    Thanks for the input from everyone, it's been an education. I'll have
    to contact Sun on this one.

    Monty
     
    Monty, Nov 1, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luke Dalessandro
    Replies:
    0
    Views:
    624
    Luke Dalessandro
    Jan 15, 2006
  2. zxo102
    Replies:
    0
    Views:
    429
    zxo102
    Aug 1, 2006
  3. saiho.yuen
    Replies:
    3
    Views:
    457
    kaeli
    Sep 14, 2004
  4. John Bailo

    IE7 shows location even if location=no

    John Bailo, Jan 19, 2007, in forum: Javascript
    Replies:
    4
    Views:
    195
    OmegaJunior
    Mar 11, 2007
  5. hehehe

    adf java and <location></location>

    hehehe, Jul 6, 2009, in forum: Javascript
    Replies:
    1
    Views:
    116
    Evertjan.
    Jul 6, 2009
Loading...

Share This Page