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

module crypto reads package org.web3j.crypto from both core and crypto #2126

Open
ismaildrs opened this issue Dec 15, 2024 · 1 comment
Open
Labels
needs-review issue/PR needs review from maintainer

Comments

@ismaildrs
Copy link

Issue_title

module crypto reads package org.web3j.crypto from both core and crypto

Issue_description

This is my project module-info.java:

module com.application.taskmanager.practiceweb3 {
    requires javafx.controls;
    requires javafx.fxml;
    requires abi;
    requires core;
    requires crypto;

    opens com.application.taskmanager.practiceweb3 to javafx.fxml;
    exports com.application.taskmanager.practiceweb3;
}

When i try to build it, it keep getting this error:

image

java: module crypto reads package org.web3j.crypto from both core and crypto

Issue_context

Btw, i'm using jdk 21, and web3j v4.12.1

I can't seem to find a solution to this, i would really appreciate you help.

@ismaildrs ismaildrs added the needs-review issue/PR needs review from maintainer label Dec 15, 2024
@ismaildrs
Copy link
Author

ismaildrs commented Dec 18, 2024

This problem occurred mainly when using JavaFX with web3. Since JavaFX uses modules, when adding web3j, you need to require each module you'll be using in module-info.java. My solution was to delete this file and wrap the main JavaFX application with another class. This is not an ideal solution, and a revision is required to permanently resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review issue/PR needs review from maintainer
Projects
None yet
Development

No branches or pull requests

1 participant