yarl / pattypan

Upload files to Wikimedia Commons. The Spreadsheet Way.
https://commons.wikimedia.org/wiki/Commons:Pattypan
MIT License
56 stars 37 forks source link

Unable to open pattypan.jar in Ubuntu 18.04 #84

Closed silviaegt closed 2 years ago

silviaegt commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

Lod3 commented 5 years ago

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

aitzolete commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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

Lod3 commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

131 makes Pattypan compatible with Java 11+ and OpenJFX.

Abbe98 commented 2 years ago

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