CMPDL icon indicating copy to clipboard operation
CMPDL copied to clipboard

Jar file won't open

Open Coffee-9003 opened this issue 5 years ago • 15 comments

I try opening the jar file but it doesn't do anything.

Coffee-9003 avatar Oct 05 '20 00:10 Coffee-9003

@CoffeeTheProto Have you tried running it from a command line?

skyecodes avatar Oct 09 '20 17:10 skyecodes

I'm getting this bug also. What's a command line?

Shadowdragon019 avatar Oct 17 '20 03:10 Shadowdragon019

Disclaimer: Only run these commands with code you trust, you might end up installing a virus if it's random code you found on the internet.

Assuming you downloaded this to your Downloads folder You can open your terminal and type

cd Downloads
java -jar cmpdl-2.3.0.jar

Change the Downloads and cmpdl-2.3.0.jar as needed if if it's in another directory or the version changes.

codedcosmos avatar Oct 29 '20 06:10 codedcosmos

I tried it and it did not work, it says: Error: Could not find or load main class com.github.franckyi.cmpdl.CMPDL

BeansBeefBroccoli avatar Nov 07 '20 19:11 BeansBeefBroccoli

@peterodavies27atgmailcom Which version of Java are you using? CMPDL is only compatible with Java 8.

skyecodes avatar Nov 07 '20 19:11 skyecodes

openjdk version "1.8.0_272" OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_272-b10) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.272-b10, mixed mode)

BeansBeefBroccoli avatar Nov 07 '20 19:11 BeansBeefBroccoli

AdoptOpenJDK doesn't include JavaFX, which CMPDL uses for the UI. You have to install OpenJFX (or build it if it's not available for your system). See https://stackoverflow.com/questions/18547362/javafx-and-openjdk

skyecodes avatar Nov 07 '20 19:11 skyecodes

gluonhq.com/products/javafx

Do I install JavaFX Windows SDK or JavaFX Windows jmods or something else?

BeansBeefBroccoli avatar Nov 07 '20 20:11 BeansBeefBroccoli

Gluon only distributes JavaFX starting from version 11, and you need version 8 to run CMPDL. Honestly, since you're using Windows, I think the easiest way to fix your issue would be to use the Oracle JRE instead of AdoptOpenJDK. You can download it here https://java.com/en/download/manual.jsp

skyecodes avatar Nov 07 '20 20:11 skyecodes

ok

BeansBeefBroccoli avatar Nov 07 '20 20:11 BeansBeefBroccoli

Acctually you can also use newer versions of Java (AdoptOpenJDK is fine if you also install openjfx (https://openjfx.io/)) and with it JavaFX . The command you need to run it from command line would be: java --module-path "%JAVAFX_HOME%\lib" --add-modules javafx.controls,javafx.fxml -jar cmpdl-2.3.0.jar You have to replace %JAVAFX_HOME% with the file path to where you have JavaFX installed to. For example: C:\Program Files\Java\JavaFX\javafx-sdk-15.0.1 Or more advanced: Create a environment variable with that name and the file path.

Klotzi111 avatar Nov 11 '20 23:11 Klotzi111

I've tried what you said but i'm getting the error "Error occurred during initialization of boot layer java.lang.LayerInstantiationException: Package jdk.internal.jimage in both module jrt.fs and module java.base"

u6f avatar Jun 23 '23 13:06 u6f

This application is only compatible with Java 8

skyecodes avatar Jun 23 '23 13:06 skyecodes

This application is only compatible with Java 8

Switched to java 8 and get this Error: Could not find or load main class com.github.franckyi.cmpdl.CMPDL

u6f avatar Jun 23 '23 14:06 u6f

I've tried what you said but i'm getting the error "Error occurred during initialization of boot layer java.lang.LayerInstantiationException: Package jdk.internal.jimage in both module jrt.fs and module java.base"

Okay for me this works even with OpenJDK adoptium.net Temurin java 20 (@skyecodes). To diagnose this we need more info about your system. We need:

  • OS (Windows 10/11, Linux (what distro), ...)
  • Architecture (x86, x86_64, arm64, ...)
  • Java Version (with install path)
  • JavaFX Version (with install path)
  • A screenshot of the window telling you about the error
  • The Version of CMPDL and where you downloaded it from

Klotzi111 avatar Aug 20 '23 08:08 Klotzi111