Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application will not launch in OpenJDK (but not Oracle JDK) #11

Open
LordBurtz opened this issue Feb 3, 2021 · 7 comments
Open

Application will not launch in OpenJDK (but not Oracle JDK) #11

LordBurtz opened this issue Feb 3, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@LordBurtz
Copy link

When I try to start the application with ´java -jar 'Lazer_exporter.jar'´ i get the error:
Error: Could not find or load main class com.ringosham.Main Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
I tried putting the .jar in the main directory (git cloned that), putting it into src/ and all src/* directories..
Sorry for the inconvenience but I dont know how to use that jar

@LordBurtz LordBurtz added the bug Something isn't working label Feb 3, 2021
@ringosham
Copy link
Owner

Please use Java 8. It will not run on anything higher.
You can check you Java version by java -version

@LordBurtz
Copy link
Author

Sorry to reopen this rather stupid question -but I cant get this to work...
Command: java -jar Lazer_exporter.jar
Error: Error: Could not find or load main class com.ringosham.Main
java version: openjdk version "1.8.0_292" OpenJDK Runtime Environment (build 1.8.0_292-b10) OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)
archlinux-java get: java-8-openjdk

I decompiled your release 1.6 and it looks fine.. the Main class is correctly specified idk why this happens

@ringosham
Copy link
Owner

Sorry but I cannot reproduce your issue.
Something must have gone wrong with your Java installation.

My Java version:

java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)

@danbulant
Copy link

I have the same problem on Manjaro

❯ java -version
openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment (build 16.0.2+7)
OpenJDK 64-Bit Server VM (build 16.0.2+7, mixed mode)

Other java applications (minecraft, lavalink) work just fine.

@danbulant
Copy link

However, using the java JRE 1.8 by oracle (not the OpenJDK version) works. Those aren't available in linux repos as they're proprietary though (and snap install doesn't work).

@ringosham
Copy link
Owner

ringosham commented Sep 13, 2021

Ah so this must have been Oracles fault (or maybe the team in OpenJDK).
I'll see what can be done.

@ringosham ringosham reopened this Sep 13, 2021
@ringosham ringosham changed the title Could not find or load main class com.ringosham.Main Application will not launch in OpenJDK (but not Java HotSpot JDK) Sep 13, 2021
@ringosham ringosham changed the title Application will not launch in OpenJDK (but not Java HotSpot JDK) Application will not launch in OpenJDK (but not Oracle JDK) Sep 13, 2021
@ringosham
Copy link
Owner

ringosham commented Sep 13, 2021

It turns out that OpenJDK 8 does not include JavaFX (The graphical frontend) in its dependency (and all later versions of OpenJDK as well)

On Linux, this can be solved by installing openjfx
See https://stackoverflow.com/questions/63842928/openjdk8-and-javafx-on-macos for macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants