aekrylov / vic2_economy_analyzer

Victoria 2 savegame economy analyzer, updated version
Other
46 stars 8 forks source link

Error: could not find or load main class on Linux #13

Closed docthorium closed 1 year ago

docthorium commented 4 years ago

I tried to run the jar file with java -jar and it could not load the main class. I am running openJDK version 1.8.0_222 on Arch Linux.

aekrylov commented 4 years ago

Hello, can you paste the exact error message? Also note that OpenJDK doesn't come with JavaFX on some systems, so you may need to install it separately

Spartan322 commented 4 years ago

Pretty certain he means Error: Could not find or load main class org.victoria2.tools.vic2sgea.gui.Main

aekrylov commented 4 years ago

Can't tell without the stack trace, but the most probable reason is that you're using OpenJDK and don't have JavaFX installed. In that case you may see something like that:

Error: Could not find or load main class org.victoria2.tools.vic2sgea.gui.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

You'll have to install openjfx, for example, or a different JavaFX distribution. The app will not and is not intended to work without JavaFX installed in the system

Spartan322 commented 4 years ago

I never got the NoClassDefFoundError, it only reports the first part, I don't have time to manually build and setup JavaFX which would be the only way to get it functional on my setup, so I can't actually specifically confirm its a lack of JavaFX, though I can't discount it because all the usual current repos are dead.

aekrylov commented 4 years ago

looks like there's an easy way to bundle JavaFX since Java 11, will look into that

AvalonXD commented 3 years ago

I'm having the same issue on windows despite installing from Oracle both the SE and the one linked in the readme.

EDIT: Fixed it by uninstall and reinstalling Java.

aekrylov commented 1 year ago

Hey, I've changed packaging, now the app should work as a regular executable, see latest release for links. Closing this for now, please reopen if it still does not worl