Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177284

HTMLEditor fails to load resources from modena.css if security manager is present

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 8, 9, 10
    • javafx

      To reproduce, run HelloHTMLEditor with a security manager enabled:

      java -Djava.security.manager hello.HelloHTMLEditor

      The HTMLEditor control will fail to load the resources from the modena.css file and will produce the following warnings:

      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Cut.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Copy.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Paste.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Left.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Center.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Right.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Justify.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Outdent.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Indent.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Bullets.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Numbered.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Text-Color.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Background-Color.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Bold.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Italic.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Underline.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Strikethrough.png
      Mar 20, 2017 2:40:13 PM com.sun.javafx.css.StyleManager getCachedImage
      WARNING: Error loading image: jrt:/javafx.controls/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Break.png

      A default set of resources is used.

      I tested it on JDK 8 and it fails there, too (the URL to the resources is necessarily different, since it uses a jar: URL rather than the new-in-9 jrt: URL).

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: