2

I have gotten this result from running a javafx application using fontawesomefx

Caused by: java.lang.IllegalAccessError: tried to access method com.sun.javafx.css.parser.CSSParser.<init>()V from class de.jensd.fx.glyphs.GlyphIcon
    at de.jensd.fx.glyphs.GlyphIcon.<clinit>(GlyphIcon.java:49)

I do not know how to fix a problem like this please help.

I would like to integrate resizable icons as font elements in java programs and this is one way I tried to do it but it does not work.

compute
  • 75
  • 9

1 Answers1

0

A couple of FontAwesomeFX library existing bug reports exist for this:

  • IllegalAccessError on FontAwesomeIcon construction. The bug report has been closed, but a comment by a user on the bug report states

    the issue is still there in 8.9, try FontAwesomeFX 8.4

  • IllegalAccessError on FontAwesomeIcon construction. Same error, different report and further comments . . .

    yes I was using JDK 1.8.0_31 that's why it doesn't work for me after updating to 1.8.0_92 version everything is working great.

    AND

    This is still an issue. com.sun.javafx.css.parser.CSSParser is not accessible in Java 9 resulting in java.lang.NoClassDefFoundError.

So, whether you get an error or not will depend on the Java version you are using (and, from your comments, the library is incompatible with all Java versions you have tried).

You will need to work with the developer of the library to get the error resolved.

jewelsea
  • 150,031
  • 14
  • 366
  • 406