I have a 32-bit system and yes I made the necessary modifications but I still get this error upon running java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
I am not sure where the error occurred since nothing like this happened when I used the commands.
Here are the actual commands I used:
update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_92/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_92/bin/javac 1
update-aternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.8.0_92/jre/lib/i386/libjawt.so 1
update-alternatives --set java /opt/jdk1.8.0_92/bin/java
update-alternatives --set javac /opt/jdk1.8.0_92/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.8.0_92/jre/lib/i386/libjawt.so
I executed all of these from the directory:
root@myComputer:/opt/jdk1.8.0_92#
One thing I did is that I extracted the contents to my home directory then later copied the jdk1.8.0_92 directory and all of its contents to the /opt directory later. I doubt that makes any difference but I'm willing to try anything at this point.
If anybody else had a similar issue please respond.