Operating System - HP-UX
1748044 Members
4804 Online
108757 Solutions
New Discussion юеВ

Re: Multiple version of java in HP-UX

 
Sum_2
Occasional Contributor

Multiple version of java in HP-UX

Hi Gurus,
I have a HP-UX 11.11 box in which I have java.1.4.2.04 installed. One of our application called Mqm uses that java. There is a critical alert to upgrade to java.1.4.2.24, however, we cannot overwrite the /opt/java.1.4 directory because it will mess up the mqm application that is currently using it.
Can Any one suggest a way to install the java.1.4.2.24 version to a different directory (for instance /opt/java1.4.2.24) instead of the default /opt/java.14.

Thanks,
Suma
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Multiple version of java in HP-UX

Shalom Suma,

Suggestions

1) Use another system
2) Use a different target for the install. I tried this and its a PITA. This is done in the swinstall process

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tingli
Esteemed Contributor

Re: Multiple version of java in HP-UX

You can install it to a different directory, such as /opt/java.1.4.2.24. And you need to set Mqm to the new java place.
Dennis Handly
Acclaimed Contributor

Re: Multiple version of java in HP-UX

>Can anyone suggest a way to install the java.1.4.2.24 version to a different directory?

There are two ways swinstall can do this. Alternate root: @ /alternate-root path
Locatable
swlist -a is_locatable -s $PWD/foo.depot

Is is_locatable true for your depot?

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1132499
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1165706
SoorajCleris
Honored Contributor

Re: Multiple version of java in HP-UX

Hi,

Multiple versions in same system.
Is that recommended????

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
B. Hulst
Trusted Contributor

Re: Multiple version of java in HP-UX

Usually application using java have an environment variable that points to the java version to use.

set CLASSPATH=/opt/java/

You could change this after installation of the newer java version.
Wim Rombauts
Honored Contributor

Re: Multiple version of java in HP-UX

Normally, it should be nio problem to run yuor Mqm application with java 1.4.2.24. If you keep it running on java1.4.2.04, you will not fix the alert.

This is what you can do :

1) Copy your current java to a new directory : cp -pr /opt/java1.4 /opt/java1.4.2.04

2) Change the JAVA_HOME or PATH variables in the startup scripts of your application (or all java-4 applications), and restart the application when it fits you. Verify that nothing is using the regular /opt/java1.4 directory

3) Install the newer java version with swinstall without any special options.

4) Reset the JAVA_HOME and/or PATH variables to /opt/java1.4 so that the applications pick upthe newer java version once they restart.

-> If it turns out that, against all expectations, your appicatrion can't handle java 1.4.2.24, you can allways revert to the original version by setting the JAVA_HOME and/or PATH variables to /opt/java1.4.2.04


If your application cannot handle java 1.4.2.24, and you can't change the java path for your Mqm application, there is another step you can take : Move /opt/java1.4 to /opt/java1.4.2.24 and then move /opt/java1.4.2.04 to /opt/java1.4.
But you now need to change the JAVA_HOME and PATH variables for all your other java applications, or you could as well install nothing at all.