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

JavaFX/JFoenix compatibility error - module javafx.controls does not export #1526

Open
chrisfeigl opened this issue Jan 7, 2025 · 3 comments

Comments

@chrisfeigl
Copy link

I'm getting the following error when Haveno starts:

class com.jfoenix.skins.JFXTabPaneSkin (in unnamed module @0x16a0ee18) cannot access class com.sun.javafx.scene.control.behavior.TabPaneBehavior (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.behavior to unnamed module @0x16a0ee18

The menu items appear, but none of the controls or content.

I am running Haveno in Manjaro Linux on an Asus Zenbook 14 (UM3402Y).

Here's what I have tried so far:

Installed different Java versions:
Started with Java 21
Tried Java 17 (openjdk)
Tried Java 11

Attempted to install different JavaFX packages:
Tried java-openjfx-bin
Attempted jdk17-openjfx (empty repository)
Attempted openjfx17-bin (empty repository)
Tried javafx17-scenebuilder (not found)

Tried system configurations:
Changed Java versions using archlinux-java set
Cleaned project between attempts using ./gradlew clean
Used --no-daemon flag for gradle

Other attempts:
Removed previous Haveno data directory
Killed running Tor processes
Checked for and killed existing Java processes

My co-pilot says the persistent error relates to JFoenix (a JavaFX component library) being unable to access internal JavaFX classes due to Java module restrictions.

@woodser
Copy link
Contributor

woodser commented Jan 7, 2025

The application requires Java JDK 21, from the build instructions:

curl -s "https://get.sdkman.io" | bash
sdk install java 21.0.2.fx-librca

You can also try these additional steps from #1112:

sudo apt-get install git make openjdk-21-jdk
JAVA_HOME="" # to make sure it uses openjdk

Please let me know if those additional steps work and they can be added to the build instructions.

@chrisfeigl
Copy link
Author

Steps taken:

Had SDKMAN already installed
Had Java 21.0.2.fx-librca already installed through SDKMAN
Set export JAVA_HOME=""
Ran ./gradlew clean
Ran ./gradlew desktop:run --no-daemon

Still getting the same JFoenix error:
class com.jfoenix.skins.JFXTabPaneSkin (in unnamed module @0x16a0ee18) cannot access class com.sun.javafx.scene.control.behavior.TabPaneBehavior (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.behavior to unnamed module @0x16a0ee18

Environment:

OS: Manjaro Linux (kernel 6.12.4-1-MANJARO)
JRE: 21.0.2+14-LTS (BellSoft)
JVM: 21.0.2+14-LTS (OpenJDK 64-Bit Server VM)

@woodser
Copy link
Contributor

woodser commented Jan 11, 2025

Confirming that java -version shows something like?

openjdk version "21.0.2" 2024-01-16 LTS
OpenJDK Runtime Environment (build 21.0.2+14-LTS)
OpenJDK 64-Bit Server VM (build 21.0.2+14-LTS, mixed mode, sharing)

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