title: JavaFX 8 Image load (Invalid URL or resource not found)
body: <p>as said there <a href="http://docs.oracle.com/javase/8/javafx/api/javafx/scene/image/Image.html" rel="nofollow">docs.oracle</a> about Image class:</p>
  
  <pre><code>// load an image in background, displaying a placeholder while it's loading  
  // (assuming there's an ImageView node somewhere displaying this image)  
  // The image is located in default package of the classpath
  Image image1 = new Image("/flower.png", true);
  </code></pre>
  
  <p>I shared my simple project at <a href="https://github.com/aovchinn/JavaFXDemo" rel="nofollow">github</a>, so you can easily access code.<br>
  and this is piece of my code: </p>
  
  <pre><code>splashScreen = new Image("/gravixsplash.png");
  splashScreenBackplate = new ImageView();
  splashScreenBackplate.setImage(splashScreen);
  
  instructionLayer = new Image("/gravixinstructions.png");
  splashScreenTextArea = new ImageView();
  splashScreenTextArea.setImage(instructionLayer);
  </code></pre>
  
  <p>But this don't wanna work for me, I get this:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: Invalid URL or resource not found at javafx.scene.image.Image.validateUrl(Image.java:1081)  </p>
  </blockquote>
  
  <p>at (Image.java:1081) I find this:  </p>
  
  <pre><code>if (resource == null) {
      throw new IllegalArgumentException("Invalid URL or resource not found");
  }
  </code></pre>
  
  <p>I assume that my url(resource) is for some reason equal to null, but it didn't help me find the solution.  </p>
  
  <p>(Maybe somehow I need to turn on javaFX8, i suspect that intellijIDEA build javaFX2 project, I was searching for this in settings, but didn't find anything)</p>