Java 1.7 64-bit on Solaris 11 and “java/lang/NoClassDefFoundError: java/lang/Object” error message


My Solaris 5.11 install came with java version 1.8. Surely the dev wants a specific, obscure version of java for his application, so I had to do the extra work on hunting for the installation package for that particular version, and install them on the box

Update to Java 7 are no longer publicly available, and Oracle will urge you to move to Java 8. If you have to use Java 7, the latest update you can use can be downloaded from here. If you’re on 64-bit installation and you want 64-bit version of Java 7, you’ll need to download both 32-bit and 64-bit version since installing only the 64-bit version will give you this error message

root@werkbau:/usr/java# jre1.7.0_80/bin/amd64/java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

Pick your version, in my case it’s the 7u80, and drop both packages into a directory, let say /tmp, and unpack both of them

root@werkbau:/tmp# tar zxvf jre-7u80-solaris-x64.tar.gz
root@werkbau:/tmp# tar zxvf jre-7u80-solaris-i586.tar.g

Both unpacked packages will be stored on a folder named jre1.y.x_xx. in my case it’s  jre1.7.0_80. We can then move the package to /usr/java

root@werkbau:/tmp# mv jre1.7.0_80 /usr/java/

..And check the version

root@werkbau:/usr/java# jre1.7.0_80/bin/amd64/java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

..And we’re done.






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.