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

Could not find or load main class pattypan.Main in Ubuntu 20.04 #121

Closed
bodhisattwawiki opened this issue Feb 24, 2021 · 6 comments
Closed

Comments

@bodhisattwawiki
Copy link

$ java -jar pattypan.jar
Error: Could not find or load main class pattypan.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

$ java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode)

@atetevoortwis
Copy link

Same here, also with OpenJDK 8:

$ java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)

$ java -jar pattypan.jar 
Error: Could not find or load main class pattypan.Main

@Abbe98
Copy link
Collaborator

Abbe98 commented Mar 29, 2021

Duplicate of #84.

@JoKalliauer
Copy link

according to #84 (comment)

sudo update-alternatives --config java and changing to java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-0.fc33.x86_64/jre/bin/java) solved the issue for me. (Fedora 33)

@LibrErli
Copy link

LibrErli commented Oct 4, 2021

same as above (Ubuntu 20.04)

java -jar pattypan.jar
Fehler: Hauptklasse pattypan.Main konnte nicht gefunden oder geladen werden
java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

and for update-alternatives --config java there are only 2 options available (although i have installed openjfx before) - no option allows to start pattypan.

sudo update-alternatives --config java 
Es gibt 2 Auswahlmöglichkeiten für die Alternative java (welche /usr/bin/java bereitstellen).

  Auswahl      Pfad                                            Priorität Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      automatischer Modus
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manueller Modus
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manueller Modus

@JoKalliauer
Copy link

@LibrErli Could you try #84 (comment) by @Lod3 :

apt purge openjfx
apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2
apt-mark hold openjfx libopenjfx-jni libopenjfx-java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar pattypan.jar

@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 7, 2022

Pattypan 22.02 does no longer need a separate OpenJFX installation nor does it depend on Java <11.

@Abbe98 Abbe98 closed this as completed Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@atetevoortwis @Abbe98 @bodhisattwawiki @JoKalliauer @LibrErli and others