Error: Could Not Find Or Load Main Class With OpenJDK And Oracle Java
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
Nevermind, I had to move my test file under thepackagename/TheClassName.class and then it runs fine.
However my real program [1] consisting of few jar-files still does not run on CentOS (while running fine on Windows).
I have to investigate more and will ask a separate question.
Regards Alex
[1]: https://github.com/afarber/jetty-newbie/tree/master/WebsocketHandler