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

Not working #47

Closed
FakeException opened this issue Jun 13, 2021 · 12 comments
Closed

Not working #47

FakeException opened this issue Jun 13, 2021 · 12 comments

Comments

@FakeException
Copy link

I added it to gradle's dependencies but the module-info.java now is getting an error like Package .... reads package 'javafx.beans' from both 'javafx.base' and 'javafx.base' and i can't use the library, also when i try to import something it seems like the package doesn't exists

@palexdev
Copy link
Owner

Hello, can you share a minimal reproducible example?

@FakeException
Copy link
Author

`plugins {
id 'application'
id "org.openjfx.javafxplugin" version "0.0.10"
id 'org.beryx.jlink' version '2.12.0'
id "io.freefair.lombok" version "6.0.0-m2"
}

repositories {
mavenCentral()
}

dependencies {
compile 'com.jfoenix:jfoenix:9.0.10'
compile 'com.zaxxer:HikariCP:4.0.3'
compile ('io.github.palexdev:materialfx:11.11.1') {
exclude group: 'org.openjfx'
}
}

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

mainClassName = "me.darkboy.MainApp"

jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher {
name = 'example'
}
}`

`module Example.main {

requires transitive javafx.controls;
requires transitive javafx.fxml;
requires transitive javafx.graphics;

requires com.jfoenix;

requires static lombok;

requires java.sql;
requires com.zaxxer.hikari;
requires java.sql.rowset;

opens me.darkboy to javafx.fxml;
opens me.darkboy.controllers to javafx.fxml;

exports me.darkboy;
exports me.darkboy.controllers;
exports me.darkboy.mysql;
exports me.darkboy.mysql.utils;
exports me.darkboy.mysql.queries;

}`

@palexdev
Copy link
Owner

palexdev commented Jun 17, 2021

Tried to reproduce the issue, but everything seems to work fine
Perhaps there are some issues with your project configuration

@FakeException
Copy link
Author

can you please send me a sample project like yours just for seeing that everything is working fine

@palexdev
Copy link
Owner

This could be an example GitHub
I think it's a Gradle misconfiguration

@FakeException
Copy link
Author

ok thank you very much

@FakeException
Copy link
Author

so, i tried with a non modular project and its working, the problem is that with modular projects its not working

@palexdev
Copy link
Owner

Maybe because every module includes JavaFX, maybe this is the issue

@FakeException
Copy link
Author

yeah i see, i also tried to exclude the javafx dependency from materialfx but it still didn't work

compile ('io.github.palexdev:materialfx:11.11.1') {
exclude group: 'org.openjfx'
}

@palexdev
Copy link
Owner

Is it a compile error or just an IDE error though?

@FakeException
Copy link
Author

i haven't tried to compile but my ide can't find the materialfx's package

@FakeException
Copy link
Author

anyway i think i'll stick with a non modular project, thanks for the help.

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

No branches or pull requests

2 participants