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

Automatic module cannot be used with jlink since version > 1.3.30 #1138

Open
Dev-jero opened this issue Apr 9, 2024 · 2 comments
Open

Automatic module cannot be used with jlink since version > 1.3.30 #1138

Dev-jero opened this issue Apr 9, 2024 · 2 comments

Comments

@Dev-jero
Copy link

Dev-jero commented Apr 9, 2024

Greetings and thank you for your work.
I've got an error with the new version of OpenPDF.

Error: automatic module cannot be used with jlink: com.github.librepdf.openpdf from [...]/repository/com/github/librepdf/openpdf/2.0.2/openpdf-2.0.2.jar

It worked with version 1.3.30. Beyond that it's not working anymore.

Is it possible to fix it? Because it was very practical.
Regards.

Edit:
Okay, found a little fix but that's not great.

  • By defining static in my module-info requires static com.github.librepdf.openpdf;;
  • By adding <options>-classpath openpdf-2.0.2.jar --module-path openpdf-2.0.2.jar --add-modules com.github.librepdf.openpdf</options> for the javafx-maven-plugin in my pom (and of course the jar inside the correct directory)
@asturio
Copy link
Member

asturio commented Apr 14, 2024

This is a good question. In 1.3.30 there was some module-info.java files, but these aren't there anymore. These must have been removed by accident in some old PR.

@asturio
Copy link
Member

asturio commented Apr 18, 2024

@Dev-jero
It seems the module-info.java's were removed in 1.3.37. So until 1.3.36 you shouldn't have any problem.
But now we split OpenPDF in 3 different Versions:

  • 1.3-line: compiled with Java 8
  • 1.4-line: compiled with Java 11
  • 2.0-line: compiled with Java 17

So the module-info makes no sense in 1.3 anymore, but probably in 1.4 and 2.0

How was you calling jlink before?

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

No branches or pull requests

2 participants