Support of SVG ImageLoader in JavaFX

René Reiß rr at
Mon Nov 5 11:03:12 UTC 2018


In Java 8 I used a SVGImageLoader to support SVGs in css-Files, 
something like
-fx-background-image : url("/svg/minusicon.svg");

see also

In Java 11 I get an IllegalAccessError

java.lang.IllegalAccessError: superinterface check failed: class 
SvgImageLoaderFactory (in unnamed module @0x2a8d6c41) cannot access 
class com.sun.javafx.iio.ImageLoaderFactory (in module 
because module does not export com.sun.javafx.iio to 
unnamed module @0x2a8d6c41

I know, the ImageLoaderFactory is not part of the official JavaFX public 
API. But, why not? Why it is no more possible to write an own 
ImageLoader? It is planned for the future?

Is there another possibility to support SVGs in JavaFX applications?
Otherwise I have to convert all SVGs to png or jpegs, but this will be a 
step backwards for me.



René Reiß

More information about the openjfx-dev mailing list