aspose file tools*
The moose likes Linux / UNIX and the fly likes Java1.4 on Solaris 2.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Java1.4 on Solaris 2.6" Watch "Java1.4 on Solaris 2.6" New topic
Author

Java1.4 on Solaris 2.6

Shane Roylance
Ranch Hand

Joined: Aug 29, 2001
Posts: 72
I am trying to install Java 1.4 on a Solaris 2.6 box, but I also have java 1.3.1 installed which I do not want to remove. But when I try to install the 1.4 packages it says they are already installed and does nothing. Is there any way to put both version on the same system. (I am not trying to install them in the same directory)
I am not sure this is the right spot to post this, but it seemed the best fit
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

This might be a better fit in the Unix forum, so I'll move it there (and then respond to it).


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Hi Shane - I'n not familiar with Solaris, but ...
You should be able to easily accomplish this.
If you are installing from the 'tar.gz' file, then unwind it, cd to that directory, and run a
./configure
with options for changing the install configuration. There should be documentation on this somewhere in the unwind directory/subdirectories.
HTH, Guy
Shane Roylance
Ranch Hand

Joined: Aug 29, 2001
Posts: 72
The installation uses the pkgadd utility. I am not certain how this works, but I assume it is checking the system to see if the package is already installed. Unfortunately it doesn't seem to want to let me install the same package in two seperate locations.
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
'pkgadd' sounds like Solaris specific to me.
I unerstand Linux Red Hat packages fairly well, but doubt they are the same thing.
One thing you could try, look at the man page for pkgadd, and then follow the 'see also' verbage.
I guess you need to get a list of the packages installed.
I'd have thought that JDK1.4 would have a different package name than 1.3 'tho.
G.
Come on guys, someone here must have some expereince on Solaris boxes.
keerthidhar dongre
Greenhorn

Joined: Jan 30, 2002
Posts: 26
Shane,
Here are a few approaches you could try.

1) Try using the -R option of pkgadd to change the root path. This shall specify where all files (packaged files) shall be put.
2) Try to debug using -v option. This gives an indication as to which script failed.
3) I almost typed use pkgrm, but since you dont like erasing old version this approach wont serve your purpose.
Please post the result of debug.
Guy Allard,
You are correct pkgadd is a utility which is unique to Solaris. As Redhat uses rpms, Solaris uses packages (filenames end with .pkg).
Regards,
Keerthi
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

I was surprised by the comment that pkgadd is unique to Solaris, since I've used it as far back as 1994 on NCR systems running USL ('vanilla') Unix. Nonetheless, I looked around and sure enough, seems like everyone is using their own thing these days: HP-UX has a tool called 'depot', AIX has 'lpp' and IRIX (as if anyone cares) uses 'inst.'
Learn sumpn new every day. However, there is not a standard filename extension for pkg files. Solaris does not identify files by a dot-extension (excpt perhaps by some GUI-based file managers), but by the first two bytes in the file itself. You can add extensions to support usability, but you can have any extension you want, or none at all -- it'd still be usable by the approrpiate program.
[ March 13, 2002: Message edited by: Michael Ernest ]
Shane Roylance
Ranch Hand

Joined: Aug 29, 2001
Posts: 72
The command I was trying to run is this:
pkgadd -va admin -d . SUNWj3rt
With this I have an admin file with the entry "basedir=/sds/j2se1.4" which is where I want it installed. The results from this are as follows:
# pkgadd -va admin -d . SUNWj3rt
Processing package instance SUNWj3rt from /opt/work/shane/java1.4
J2SDK 1.4 runtime environment
(sparc) 1.4.0,REV=2002.01.30.06.00
Copyright 2001 Sun Microsystems, Inc. All rights reserved.
Copyright 2001 Sun Microsystems, Inc. Tous droits rservs.
Do you want to create a new instance of this package [y,n,?,q] y
Using /sds/j2se1.4 as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Installation of SUNWj3rt.2 was suspended (administration).
No changes were made to the system.

Using the -R option I had to take out the basedir setting from my admin file, but the results are as follows:
# pkgadd -va admin -d . -R /sds/j2se1.4 SUNWj3rt
Processing package instance SUNWj3rt from /opt/work/shane/java1.4
J2SDK 1.4 runtime environment
(sparc) 1.4.0,REV=2002.01.30.06.00
Copyright 2001 Sun Microsystems, Inc. All rights reserved.
Copyright 2001 Sun Microsystems, Inc. Tous droits rservs.
Using /sds/j2se1.4 as the package base directory.
## Processing package information.
## Processing system information.
1 package pathname is already properly installed.
## Verifying package dependencies.
WARNING:
The SUNWcar package "Core Architecture, (Root)" is a
prerequisite package and should be installed.
WARNING:
The SUNWkvm package "Core Architecture, (Kvm)" is a
prerequisite package and should be installed.
WARNING:
The SUNWcsr package "Core Solaris, (Root)" is a
prerequisite package and should be installed.
WARNING:
The SUNWcsu package "Core Solaris, (Usr)" is a
prerequisite package and should be installed.
WARNING:
The SUNWcsd package "Core Solaris Devices" is a
prerequisite package and should be installed.
WARNING:
The SUNWmfrun package "Motif RunTime Kit" is a
prerequisite package and should be installed.
WARNING:
The SUNWlibC package "Sun Workshop Compilers Bundled
libC" is a prerequisite package and should be
installed.
Installation of SUNWj3rt was suspended (administration).
No changes were made to the system.
It looks like it can't see any of the other packages if you do this, which is not what I want. It just doesn't seem like it should be this hard.
[ March 13, 2002: Message edited by: Shane Roylance ]
keerthidhar dongre
Greenhorn

Joined: Jan 30, 2002
Posts: 26
Shane,
Today I tried installing 1.4 on Solaris 8.
The version used was Solaris SPARC 32 bit.
Earlier version was 1.2.2 and I did not want that to be erased.
Before installation:
java -version gave
Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)
java was installed in a directory /usr/java1.2
Here is the procedure which worked for me.
1)unzip, untar into a directory.
gunzip j2sdk----.gz
tar -xvf j2sdk----.tar1
2)It creates some subdirectories like SUNWjrt, SUNWdmo, SUNWdev, SUNWman etc.
3)pkgadd -d . SUNWj3rt SUNWj3dev SUNWj3man SUNWj3dmo
4) This shall install sdk in /usr/j2se (It takes /usr as the Base directory) since no base directory is specified.
5) Earlier versions too was installed in the same directory but they had names like java1.1, java 1.2 etc. They were intact after the installation of 1.4.
After installation
/usr/j2se/bin/java -version displayed
------------------
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
and
java -version displayed
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)

So the directory in which previous version is installed should be different from "/usr/j2se" (And relevant changes should be made to Classpath etc. if required)
Copying all relevant packages in a subdirectory usr of a base directory like for example (/foo/bar/usr) did not work. As it still came up with warning messages.


Micael,
Whoa
:roll: :roll: I cant believe the author of the book I am reading is correcting me . Thanks for correcting me, and letting me know that some other flavours of unix too use pkgxxx utility.
Though file name extensions are not important they are used as an indication to the source. For example ucd,mit,cit,narc etc. Some of GNU packages have .pkg.
Thanks,
Keerthi
keerthidhar dongre
Greenhorn

Joined: Jan 30, 2002
Posts: 26
Shane,
Today I tried installing 1.4 on Solaris 8.
The version used was Solaris SPARC 32 bit.
Earlier version was 1.2.2 and I did not want that to be erased.
Before installation:
java -version gave
Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)
java was installed in a directory /usr/java1.2
Here is the procedure which worked for me.
1)unzip, untar into a directory.
gunzip j2sdk----.gz
tar -xvf j2sdk----.tar1
2)It creates some subdirectories like SUNWjrt, SUNWdmo, SUNWdev, SUNWman etc.
3)pkgadd -d . SUNWj3rt SUNWj3dev SUNWj3man SUNWj3dmo
4) This shall install sdk in /usr/j2se (It takes /usr as the Base directory) since no base directory is specified.
5) Earlier versions too was installed in the same directory but they had names like java1.1, java 1.2 etc. They were intact after the installation of 1.4.
After installation
/usr/j2se/bin/java -version displayed
------------------
java version "1.4.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
and
java -version displayed
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_07, native threads, sunwjit)

So the directory in which previous version is installed should be different from "/usr/j2se" (And relevant changes should be made to Classpath etc. if required)
Copying all relevant packages in a subdirectory usr of a base directory like for example (/foo/bar/usr) did not work. As it still came up with warning messages.


Micael,
Whoa
:roll: :roll: I cant believe the author of the book I am reading is correcting me . Thanks for correcting me, and letting me know that some other flavours of unix too use pkgxxx utility.
Though file name extensions are not important they are used as an indication to the source. For example ucd,mit,cit,narc etc. Some of GNU packages have .pkg.
Thanks,
Keerthi
keerthidhar dongre
Greenhorn

Joined: Jan 30, 2002
Posts: 26
Oops sorry I guess I clicked twice.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Shane -
I was fairly sure you were barking up the wrong tree, but had to do some checking before I said so.
The problem lies with the intent of the packaging. The pkg itself is designed to treat successive versions of the JDK as an upgrade only. The pkg name is kept constant to support this intent. It's thus a "feature" of the pkg design that it does not allow you to install two versions of the "same thing."
If you must do it this way, it gets really hairy. You have to rename the packages (and the internal points to the old name) to get what you want. I don't recommend it.
I would instead look for a version of J2SE1.4 that comes in a tar or gz form or is installed in a way that doesn't rely on a package scheme. I'm sure such a creature is available from http://java.sun.com.
Sorry for all your grief,
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Keerthidhar -
Happy to be of help; you taught me something too, which is why I like hanging around the ranch.
Being something of a Solaris bigot, I am sometimes quick to decry "Microsoft conventions" just because. So I often view dot-file extensions as an admission of guilt that DOS couldn't do any better and Windows still can't. In private, though, and after a few drinks I might admit that most people don't want to know how an OS works and just need to know what a file does by reading the name.
Shane Roylance
Ranch Hand

Joined: Aug 29, 2001
Posts: 72
Thanks for your help. I found a self-extracting executable from sun to do the install. This worked very well. I guess I just got hung up on trying to get the package thing to work.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java1.4 on Solaris 2.6