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

Jigsaw compatibility #8

Closed
rahmanusta opened this issue Jan 14, 2017 · 6 comments
Closed

Jigsaw compatibility #8

rahmanusta opened this issue Jan 14, 2017 · 6 comments
Assignees

Comments

@rahmanusta
Copy link

I don't know whether is it a JDK 9 bug, but I get the following error while using ikonli.

java.lang.NoClassDefFoundError: Could not initialize class org.kordamp.ikonli.javafx.FontIcon$StyleableProperties
        at org.kordamp.ikonli.javafx.FontIcon.getClassCssMetaData(FontIcon.java:301)
        at org.kordamp.ikonli.javafx.FontIcon.getCssMetaData(FontIcon.java:305)
        at javafx.graphics/javafx.scene.CssStyleHelper$CacheContainer.<init>(CssStyleHelper.java:380)

Do you have any opinion for that?

Thanks.

@rahmanusta
Copy link
Author

The reason is converter classes in com.sun.** moved to javafx.css.converter, but still I couldn't build project with jdk 9. I used the following JVM paremeters:

-Dsun.reflect.debugModuleAccessChecks=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/sun.security.provider=ALL-UNNAMED

@rahmanusta
Copy link
Author

Have you ever try to build ikonli with Java 9 Jigsaw @aalmiray ? Thanks.

@aalmiray
Copy link
Collaborator

aalmiray commented Mar 3, 2017

hint: consider using MRJARs instead of multiple JARs with classifiers. See JEP 238.

Must figure out a way to build MRJARs with Gradle.

@aalmiray aalmiray self-assigned this Mar 3, 2017
@aalmiray
Copy link
Collaborator

This has turn out to be a major issue. FontIcon makes use of private APIs in Java8 that have been migrated to public in Java9. In order to maintain compatibility 2 versions of this class must be compiled, one with JDK8 and the other with JDK9. This means the build must have access to both JDKs and build each sourceset separately, then combine resources in a single MRJARs. Gradle can't do this and neither can Maven. Resorting to Makefiles or shell scripts is the only way, and that's too low level and troublesome.

Alternatives are if a single JAR is desired:

  • keep Ikonli compatible with Java8 until it's phased out.
  • upgrade all of Ikonli to Java9. Can't use Ikonli on Java8.

@aalmiray
Copy link
Collaborator

Ikonli 2.0.0 has been released. It works on JDK9 and automatic modules.

@rahmanusta
Copy link
Author

rahmanusta commented Sep 27, 2017 via email

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