Having EPEL respository active, using software gui I removed all the OpenJava or OpenJDK stuff; did a search on java and unchecked using good judgement. Some things like json-glib or python-javapackages or tzdata-java I left alone.
then i did a yum install jdk-8u191-linux-x64.rpm
which is from oracle.
That shows up in software gui as jdk1.8-2000:1.8.0.201-fcs
with no Open wording, and all the OpenJava or OpenJDK stuff is not installed.
After that it works only using java -jar StigViewer.jar
If I do just java StigViewer.jar I still get the error, and if I double click on the .jar file from the windows explorer it opens the file like it was a container.
When installing centos 7.6; I chose Server with GUI and I think there was a choice for java stuff but if there was I know I didn't choose, so it seems centos installs openjava automatically to some extent.
update:
oracle jdk-8u201-linux-x64.rpm results in /usr/bin/java
link to /etc/alternatives/java
which then points to /usr/java/jdk1.8.0_201-amd64/jre/bin/java
it is THIS oracle java that works with this stigviewer.jar file only by java -jar stigviewer.jar
Other software like Octave and plplot rely on OpenJDK Headless Runtime Environment 8 which is java-1.8.0-openjdk-headless-1:1.8.0.201
and that results in the /usr/bin/java
still linking to /etc/alternatives/java
and that links to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre/bin/java
which is no workie for this stigviewer.jar file.
So I can remember to manually run Oracle's /usr/java/jdk1.8.0_201-amd64/jre/bin/java
when I need to. It seems once OpenJDK is at all installed, the oracle rpm will not overwrite the links.
java <classname>
orjava -jar <filename>
.java -jar StigViewer-2.8.jar
produces the same error: could not find or load main class.jdk-8u191-linux-x64.rpm
from oracle and did ayum install
on it. Then this jar file did not work. So using software gui i installed openjk 1.6, 1.7, 1.11; 1.8 already installed.