Page 1 of 1

[Solved]: Gentoo, Oracle JDK gives: Could not find or load main class com.cncsoftwaretools.autoleveller.Autoleveller

Posted: Fri Nov 19, 2021 6:36 pm
by pickworthi
As instructed on the web site, and in this forum, I installed the Oracle JDK package dev-java/oracle-jdk-bin-1.8.0.251, and set it as the default to use for my user:

Code: Select all

$ java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
$ 
However, when I run the jar file I get the class not found error:

Code: Select all

$ java -jar AutolevellerAE-0.9.5u2.jar
Error: Could not find or load main class com.cncsoftwaretools.autoleveller.Autoleveller
$
Could somebody please give me a clue what I am doing wrong?
Thanks

Re: Gentoo, Oracle JDK gives: Could not find or load main class com.cncsoftwaretools.autoleveller.Autoleveller

Posted: Fri Nov 19, 2021 9:48 pm
by pickworthi
Found the problem.

The Gentoo package gives the option of installing javafx. which I did not do at the first attempt.
With javafx installed, Autoleveller starts OK.

This also gives the reason why the Oracle JDK has to be used. As far as I can tell, there is no way to get javafx with the openjdk alternatives.

Re: [Solved]: Gentoo, Oracle JDK gives: Could not find or load main class com.cncsoftwaretools.autoleveller.Autoleveller

Posted: Sat Nov 20, 2021 10:40 am
by daedelus
Excellent. And thanks for posting the solution. That will help others too.