Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NoClassDefFoundError: javafx/application/Application #131

Open
Jimmeh94 opened this issue Aug 19, 2022 · 3 comments
Open

NoClassDefFoundError: javafx/application/Application #131

Jimmeh94 opened this issue Aug 19, 2022 · 3 comments

Comments

@Jimmeh94
Copy link

Jimmeh94 commented Aug 19, 2022

Hi there. I'm getting an NoClassDefFoundError: javafx/application/Application exception being thrown.

My build.gradle is here

plugins {
    id 'java'
    //id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.13'
}

repositories {
    mavenCentral()
}

/*application {
    mainModule = 'com.playarcanum.workzone.client.gui'
    mainClass = 'com.playarcanum.workzone.client.gui.WorkzoneGUI'
}*/

javafx {
    version = '17.0.1'
    modules = ['javafx.controls', 'javafx.fxml']
}

I was thinking that maybe I was running the wrong Gradle task, but it seems like the only JavaFX-related task is "configJavafxRun". Any help is greatly appreciated!

@zapek
Copy link

zapek commented Sep 22, 2024

Same here but only when upgrading to 0.1.0. Fine with 0.0.14.

@danielpeintner
Copy link

Is it related to #169 (comment) ?

Do you need to add 'javafx.base' and others in modules ?
Maybe it helps...

@zapek
Copy link

zapek commented Sep 23, 2024

@danielpeintner I already tried but it doesn't change anything, unfortunately.

The project is https://github.com/zapek/Xeres
Requires JDK 21, changing the javafxplugin version in ui/build.gradle to 0.1.0 and running the 'bootRun' task.

But it's becoming quite a complex project (JavaFX + Spring Boot) so I can understand if you don't want to try it. I know Spring Boot doesn't play well with JPMS which is why I don't use modules. I tried all suggestions in the readme but they don't help.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants