MovingBlocks / TerasologyLauncher

Terasology Launcher is the official launcher for the open source game Terasology.
http://terasology.org/
Apache License 2.0
154 stars 76 forks source link

Launcher broken on Linux? #345

Closed Cervator closed 8 years ago

Cervator commented 8 years ago

Had two user reports today. Latest launcher here from GitHub (v3.0.0) with a good Java setup, yet every method of launching the game resulted in:

Error: Could not find or load main class org.terasology.launcher.TerasologyLauncher

Works fine for me on Windows from .exe, .bat, and direct java -jar execution.

No appropriate computer available to help debug/fix here :(

skaldarnar commented 8 years ago

I tested it on my machine (4.2.8.1-1-MANJARO) with both Oracle JDK (openjdk version "1.8.0_66") and OpenJDK (openjdk version "1.8.0_66"). I was able to launch the launcher with the executable file `bin/TerasologyLauncher' without problems. Running from source also works.

I'll need some more info to look further into it, log files if available, and maybe additional information about the systems.

Cervator commented 8 years ago

Thanks :-)

The original report was from #BTM on Espernet, chessandgo / @MarkDerosier was able to replicate it at the time. CompanionCube and maybe another person reported it. Since chessandgo could replicate I didn't dig much deeper for details at the time :(

@MarkDerosier Wan-Kenobi you're our only hope!

MarkDerosier commented 8 years ago

the package java-openjfx is needed in addition to openJDK8 to run the launcher.

failed to run on Arch(64bit), installed package, runs fine.

MANJARO is just the less pure version of arch so the package is probably named the same (and automatically installed)

skaldarnar commented 8 years ago

You're right, the package is named the same and I have it installed (though I remember doing it when trying to run the launcher with OpenJDK a while ago). Is that the problem we are looking for?

Cervator commented 8 years ago

Most likely, yep. Probably some Linux distros (or users) have ended up with a more complete Java package while others lack JavaFX.

What I don't get is why - the point of JavaFX is to be able to rely on UI classes from the JDK rather than having to bundle anything, right? So why is it apparently so easy to run into case where it is missing...

Probably our best option is to document it well for the time being then aim to embed the right JRE including JavaFX when we get back to that topic? Sucks having a minimal launcher that ends up not working if something is missing, argh. But any option to auto-install it is probably opening up a bigger problem :(

skaldarnar commented 8 years ago

It always works with Oracle's JDK/JRE, the problem lies with the OpenJDK version. I'm not sure why they have it separately, but when in doubt "historical reasons" always applies.

I'll have a look whether there is a good way to check if the JavaFX stuff is present - obviously this would have to be done close to the pure main method before anything related to JFX is instantiated... We'll see.

Having the proper OracleJRE bundled would solve the problem in any case I think.

real-felix commented 5 years ago

the package java-openjfx is needed in addition to openJDK8 to run the launcher.

failed to run on Arch(64bit), installed package, runs fine.

MANJARO is just the less pure version of arch so the package is probably named the same (and automatically installed)

For Fedora, the fix is:

# dnf install java-1.8.0-openjdk-openjfx