title: Alerts in JavaFX – Icons don’t show up after exporting jar
body: <p>I’ve been trying to develop an application using Alerts, but after exporting the jar, the icon that should be displayed in the dialog, is gone:</p>
  
  <p><a href="https://i.stack.imgur.com/HK7Qh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HK7Qh.png" alt="confirmation without icon"></a></p>
  
  <p>When I start from Eclipse, the icon is shown:</p>
  
  <p><a href="https://i.stack.imgur.com/dYco8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dYco8.png" alt="enter image description here"></a></p>
  
  <p>What am I doing wrong?
  The code:</p>
  
  <pre><code>public class Main extends Application{
      @Override
      public void start(Stage primaryStage){
          Alert alert = new Alert(AlertType.CONFIRMATION);
          alert.show();
      } 
  
      public static void main(String[] args){
          launch(args);
      }
  }
  </code></pre>
  
  <p><strong>Edit:</strong> When starting from the command line, the following error is printed:</p>
  
  <p>com.sun.javafx.css.StyleManager getCachedImage</p>
  
  <p>WARNING: Error loading image: rsrc:dialog-confirm.png</p>
  
  <p>I can’t figure out, why the image is (probably) missing.</p>