Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Troubles adding java 1.4.2 and Sun WS11 to Solaris 5.8

Status
Not open for further replies.

Job317

Programmer
Aug 15, 2007
37
US
Hmm. I'm kind of stuck on installing the Sun Workshop 11 package on my vintage Sparc 5.8 system. The prerequisites call for JRE 1.4.2 so I need to update this. My current /usr folder includes the following:

Code:
drwxr-xr-x    7 root     bin           512 May  1  2002 j2se
lrwxrwxrwx    1 root     bin            12 May  1  2002 java -> java1.2
drwxrwxr-x   16 root     bin           512 May  1  2002 java1.1
drwxr-xr-x   16 root     bin           512 May  1  2002 java1.2

If I unpack the j2re-1.4.2 package I get a folder j2re1.4.2_16 which (I guess) I put in the /usr folder and change the link from /usr/java -> /usr/java1.2 to /usr/j2re1.4.2_16.

This did not work outright because when I then tried to install the Sun Workshop 11 package, I get the following:

Code:
bash-2.03# ./installer -nodisplay

java.lang.NoClassDefFoundError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
        at java.awt.Font.initializeFont(Unknown Source)
        at java.awt.Font.<init>(Unknown Source)

When I check the java version, everything looks correct:

Code:
bash-2.03$ java -version
java version "1.4.2_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_16-b05)
Java HotSpot(TM) Client VM (build 1.4.2_16-b05, mixed mode)

But I see no java-specific values when I use 'set' or 'env'. Should I? Like CLASSPATH?

Any thoughts? The installation instructions for both packages is a bit vague on this.

Also, any words on system updates would be appreciated. I am pretty much from a Linux background so Solaris is a bit new for me.

Thanks.
 
I like to use the JDK/SDK packages, not the self extracting files. Note that you have to download the 64-bit pkgs as well.


Then I remove all the old versions:

pkgrm SUNWj3rt
pkgrm SUNWj3cfg
pkgrm SUNWj3dev
pkgrm SUNWj3man
pkgrm SUNWj3dmo
pkgrm SUNWj3rtx
pkgrm SUNWj3dvx
pkgrm SUNWj3dmx
pkgrm SUNWj5rt
pkgrm SUNWj5cfg
pkgrm SUNWj5dev
pkgrm SUNWj5man
pkgrm SUNWj5dmo
pkgrm SUNWj5rtx
pkgrm SUNWj5dvx
pkgrm SUNWj5dmx

Then I install the packages:

pkgadd -d . SUNWj5rt SUNWj5cfg SUNWj5dev SUNWj5man SUNWj5dmo SUNWj5jmp

64-bit pkg
pkgadd -d . SUNWj5rtx SUNWj5dvx SUNWj5dmx
 
You could try setting your JAVA_HOME variable. Some applications look for this and will fail without this variable being set.

# JAVA_HOME=/usr/j2re1.4.2_16 ; export JAVA_HOME
# PATH=$JAVA_HOME/bin:$PATH ; export PATH

Should do the trick. If you want it to stay persistent after reboot you will need to add this to your .profile or /etc/profile (assuming you're sourcing it upon login).

-bp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top