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

Unable to open pattypan.jar in Ubuntu 18.04 #84

Closed
silviaegt opened this issue Nov 5, 2018 · 14 comments
Closed

Unable to open pattypan.jar in Ubuntu 18.04 #84

silviaegt opened this issue Nov 5, 2018 · 14 comments

Comments

@silviaegt
Copy link

silviaegt commented Nov 5, 2018

I ran
java -jar pattypan.jar

in my terminal and this is what I got:

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

Any ideas of what might have happened?, I have

openjdk 10.0.2 2018-07-17

@Ash-Crow
Copy link
Contributor

Hi, I had the same problem (Ubuntu 18.04 LTS too). As suggested in #10, I did a
sudo apt-get install openjfx but it is not enough, I had to force the use of java-8-openjdk through sudo update-alternatives --config java (after reading an advice here stating to try /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar pattypan.jar (which worked but was not very practical.)

Neither OpenJDK 9 or 11 is compatible.

@Lod3
Copy link

Lod3 commented Apr 18, 2019

I did the same thing sudo apt-get install openjfx and setting java-8-openjdk through sudo update-alternatives --config java after using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar pattypan.jar It still did not work. "Error: Could not find or load main class pattypan.Main" Does aynone know what to do?

@Ash-Crow
Copy link
Contributor

Hi, I had the same problem (Ubuntu 18.04 LTS too). As suggested in #10, I did a
sudo apt-get install openjfx but it is not enough, I had to force the use of java-8-openjdk through sudo update-alternatives --config java (after reading an advice here stating to try /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar pattypan.jar (which worked but was not very practical.)

Neither OpenJDK 9 or 11 is compatible.

This worked in January but I cannot launch it right now...

@Ash-Crow
Copy link
Contributor

OK, I understand: since January I upgraded to Ubuntu 18.10, which has no version of Openjfx8 (per https://pkgs.org/download/openjfx)

Per https://bugs.launchpad.net/ubuntu/+source/openjfx/+bug/1799946, the only solution is to add the 18.04 repo, force the installation of a specific version of openjfx and pin it down to prevent apt to update it. This seems a bad idea overall (and makes it really complex to install for the non-technical users that the tool is intended for.)

@PierreSelim
Copy link

Same problem here with Java 11

$ java -version
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)

@yarl
Copy link
Owner

yarl commented May 19, 2019

notes to myself: read https://openjfx.io/openjfx-docs/#install-javafx

@Lod3
Copy link

Lod3 commented Jun 5, 2019

Same problem in the new release: java -jar pattypan. Error: Could not find or load main class pattypan.Main

@aitzolete
Copy link

I have the same error using Ubuntu 18.04 and openjdk 11.0.3.

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

@KPFC
Copy link

KPFC commented Aug 7, 2019

Same problem using archlinux and openjdk 11.0.3, however by installing openjdk and openjfx 8 I could circumvent this problem for the instant

@Lod3
Copy link

Lod3 commented Oct 28, 2019

More specifically this did the trick and everything is working now. Thank you @KPFC and @yarl
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

Ash-Crow added a commit to Ash-Crow/pattypan that referenced this issue Oct 29, 2019
Added further instructions as per the current status of yarl#84.
@Lod3
Copy link

Lod3 commented Jan 27, 2020

More specifically this did the trick and everything is working now. Thank you @KPFC and @yarl
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

This did not fix it completely on my end, or to be more specific, it stopped working.
And starting Pattypan with this command after the previous 3 commands on Ubuntu 18 did the trick.
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar pattypan.jar

@emj04
Copy link

emj04 commented Nov 22, 2020

I'm getting this error after upgrading to Fedora 33.

Using sudo update-alternatives --config java
and switching
java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.9.11-0.fc33.x86_64/bin/java)
to
java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-0.fc33.x86_64/jre/bin/java)
allows Pattypan to run again.

@Abbe98
Copy link
Collaborator

Abbe98 commented May 20, 2021

#131 makes Pattypan compatible with Java 11+ and OpenJFX.

@Abbe98 Abbe98 closed this as completed Feb 7, 2022
@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants