Error: Could Not Find Or Load Main Class With OpenJDK And Oracle Java

Home » CentOS » Error: Could Not Find Or Load Main Class With OpenJDK And Oracle Java
CentOS 1 Comment

Hello fellow Linux users,

on CentOS 7.2 I have successfully downloaded and installed Oracle Java [1]
with:

# rpm -Uvh jdk-8u91-linux-x64.rpm

Also there is already OpenJDK installed:

# rpm -qa | grep -i jdk
java-1.8.0-openjdk-headless-1.8.0.91-0.b14.el7_2.x86_64
java-1.8.0-openjdk-1.8.0.91-0.b14.el7_2.x86_64
jdk1.8.0_91-1.8.0_91-fcs.x86_64

I can switch between the 2 using this command:

# alternatives –config java

There are 2 programs which provide ‘java’.

Selection Command
———————————————

One thought on - Error: Could Not Find Or Load Main Class With OpenJDK And Oracle Java

LEAVE A COMMENT