JDK-8169276 : Fix cssref.html to remove reference to loading internal resources
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-11-04
  • Updated: 2016-11-28
  • Resolved: 2016-11-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
Description
The cssref.html has the following example, showing how to load internal resources from jfxrt.jar. As of jdk-9+111 there is no more jfxrt.jar and it is not legal to do this. This needs to be removed along fixing up any other related documentation that talks about loading internal resources.

 918     <!-- FIXME: this is no longer allowed and should be removed or redone -->
 919     <p>This snippet of code creates a scene filled with the "paste" image from HTMLEditor which is found in jfxrt.jar.</p>
 920     <textarea rows="9" cols="132">
 921 
 922     @Override public void start(Stage stage) {
 923         StackPane root = new StackPane();
 924         root.setStyle("-fx-background-image: url(/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Paste.png);");
 925         Scene scene = new Scene(root, 300, 250);
 926         stage.setScene(scene);
 927         stage.show();
 928     }
 929     </textarea>

Comments
Changeset: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/8d1129c28e28
28-11-2016

+1
14-11-2016

Kevin, could you please review the proposed change below: diff --git a/modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html b/modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html --- a/modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html +++ b/modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html @@ -915,13 +915,13 @@ </table> <p>Note that for inline styles, leading dot-segments (e.g. '..' or '.') do resolve since the path is always anchored at the root of the classpath.</p> - <!-- FIXME: this is no longer allowed and should be removed or redone --> - <p>This snippet of code creates a scene filled with the "paste" image from HTMLEditor which is found in jfxrt.jar.</p> + <p>As an example, the code snippet below creates a scene filled with a fictional 'Duke.png' image, located in an + 'image' directory:</p> <textarea rows="9" cols="132"> @Override public void start(Stage stage) { StackPane root = new StackPane(); - root.setStyle("-fx-background-image: url(/com/sun/javafx/scene/control/skin/modena/HTMLEditor-Paste.png);"); + root.setStyle("-fx-background-image: url(images/Duke.png);"); Scene scene = new Scene(root, 300, 250); stage.setScene(scene); stage.show();
13-11-2016