'Running STIGViewer on a Mac

I'm trying to run DISA's STIGViewer on my Mac. It is a JAR file, and I have Java installed on my system. Double-clicking on the file does not work, and neither does launching it from the command line.

% java -jar /Applications/STIGViewer-2.16.jar
Error: Could not find or load main class stigviewer.STIGViewer
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
%

Has anyone in the community been able to get this to work on their system?



Solution 1:[1]

My current version of Java is 16.0.2 (java -version). I tried to install Java 8, which is said to include JavaFX. I tried simple procedures (installers only, no environmental variables) but was not able to get anything to work. I tried to uninstall every install attempt to keep my system as close to its original configuration as possible.

I found some information about installing JavaFX using Homebrew (already installed on my system). I installed the version that matches my Java version using the following commands:

brew tap bell-sw/liberica
brew install --cask liberica-jdk16-full

I still don't know where JavaFX is within my configuration, but I can get STIGViewer to launch now. I can't double-click on it in my Applications folder, but I can launch it from the command line:

java -jar /Applications/STIGViewer-2.16.jar

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 shepster