Jar file won't open
I try opening the jar file but it doesn't do anything.
@CoffeeTheProto Have you tried running it from a command line?
I'm getting this bug also. What's a command line?
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.
I tried it and it did not work, it says: Error: Could not find or load main class com.github.franckyi.cmpdl.CMPDL
@peterodavies27atgmailcom Which version of Java are you using? CMPDL is only compatible with Java 8.
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)
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
gluonhq.com/products/javafx
Do I install JavaFX Windows SDK or JavaFX Windows jmods or something else?
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
ok
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.
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"
This application is only compatible with Java 8
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
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