Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multiple jdk versions on solaris--best practices and advice

807557Mar 2 2008 — edited Mar 3 2008
I am a newcomer to solaris system administration (not by choice--I am normally just a Java programmer, but am now responsible for testing code on a new solaris box), so apologies for the newbie questions below.

#1: is it typical for a brand new solaris install to have multiple versions of Java on it?

After installation, which left me with this version of solaris:
SunOS asm03 5.10 Generic_120011-14 sun4v sparc SUNW,SPARC-Enterprise-T5220
I find from pkginfo, that their are 2 old versions of java installed:
SUNWj3dev	J2SDK 1.4 development tools
SUNWj3dmo	J2SDK 1.4 demo programs
SUNWj3dvx	J2SDK 1.4 development tools (64-bit)
SUNWj3irt	JDK 1.4 I18N run time environment
SUNWj3jmp	J2SDK 1.4 Japanese man pages
SUNWj3man	J2SDK 1.4 man pages
SUNWj3rt	 J2SDK 1.4 runtime environment
SUNWj3rtx	J2SDK 1.4 runtime environment (64-bit)
SUNWj5cfg	JDK 5.0 Host Config. (1.5.0_12)
SUNWj5dev	JDK 5.0 Dev. Tools (1.5.0_12)
SUNWj5dmo	JDK 5.0 Demo Programs (1.5.0_12)
SUNWj5dmx	JDK 5.0 64-bit Demo Programs (1.5.0_12)
SUNWj5dvx	JDK 5.0 64-bit Dev. Tools (1.5.0_12)
SUNWj5jmp	JDK 5.0 Man Pages: Japan (1.5.0_12)
SUNWj5man	JDK 5.0 Man Pages (1.5.0_12)
SUNWj5rt	 JDK 5.0 Runtime Env. (1.5.0_12)
SUNWj5rtx	JDK 5.0 64-bit Runtime Env. (1.5.0_12)
Both of these versions are years old; I am surprised that there is not just a single version of JDK 1.6 installed; it only came out, what, going on 2 years ago? I definitely need JDK 1.6 for all of my software to run.

On my windows and linux boxes, I never usually have multiple JDKs; I always deinstall the current one before installing a new one. So, I went first to try and deinstall JDK 1.4 by executing
pkgrm SUNWj3dev SUNWj3dmo SUNWj3dvx SUNWj3irt SUNWj3jmp SUNWj3man SUNWj3rt SUNWj3rtx
The package manager detected dependencies like
WARNING:
	The <SUNWmccom> package depends on the package currently being removed.
WARNING:
	The <SUNWmcc> package depends on the package currently being removed.
[+ 8 more]
and I decided to abort deinstallation because I have no diea what all these other programs are, and I do not want to cripple my system.

If anyone has any idea what programs Sun is shipping that still depend on JDK 1.4, please enlighten me.

#2: Is there any easy way to not only deinstall, say, JDK 1.4 but also deinstall all packages which depend on it?

Maybe this is too dangerous.

#3: Is there at least a way that I can find all the programs which depend on an entire group of packages like
SUNWj3dev SUNWj3dmo SUNWj3dvx SUNWj3irt SUNWj3jmp SUNWj3man SUNWj3rt SUNWj3rtx
?

The above functionality would have come in real handy if I could have done it before doing what I describe next.

I next decided to try removing JDK 1.5, so I executed
pkgrm SUNWj5cfg SUNWj5dev SUNWj5dmo SUNWj5dmx SUNWj5dvx SUNWj5jmp SUNWj5man SUNWj5rt SUNWj5rtx
I thought that this command would let me know of any dependencies of ANY of the packages that are listed. It doesn't. Instead, it merely checks the first one, and if no dependencies are found, then removes it before marching down the list. In the case above, it happily removed SUNWj5cfg because there were no dependencies on it. Then it stalled on SUNWj5dev because it found dependencies like:
WARNING:
	The <SUNWmctag> package depends on the package currently being removed.
WARNING:
	The <SUNWmcon> package depends on the package currently being removed.
[+ 3 more]
#4: Have I left my JDK 1.5 crippled by removing SUNWj5cfg? Or was this pretty harmless?

#5: Was I fairly stupid to attempt the deinstallations above in the first place? Do solaris people normally leave old JDKs in place?

#6: Or is it the case that those dependency warnings are harmless: I can go ahead and remove all old JDKs, because java programs will always find the new JDK and should run just fine with it?

#7 Whats the deal with solaris and having multiple packages for something like the JDK? With Windows, for instance, the entire JDK has a single installer and deinstaller program. Its much easier to work with that the corresponding Solaris stuff. Do Solaris people simply need that much finer grained control over what gets installed and what doesn't? (Actually, with the Windows JDK, the gui installer program can let you install selected components should you wish; I am just not sure how scriptable this is versus the solaris stuff, which may be more sys admin friendly if you have to administer many machines.)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2008
Added on Mar 2 2008
2 comments
1,098 views