title: Using JavaFX with Intellij IDEA
body: <p>I've followed a tutorial precisely and I can't seem to get it to work. The tutorial is under <code>JavaFX and Intellij</code> <code>Non-modular from IDE</code> sections: <a href="https://openjfx.io/openjfx-docs/#install-java" rel="noreferrer">https://openjfx.io/openjfx-docs/#install-java</a></p>
  
  <p>Here is the error message I receive when trying to run the default Intellij Idea JavaFX project:</p>
  
  <pre><code>"C:\Program Files\Java\jdk-11.0.1\bin\java.exe" --module-path %PATH_TO_FX% --add-modules=javafx.controls,javafx.fxml --add-modules javafx.base,javafx.graphics --add-reads javafx.base=ALL-UNNAMED --add-reads javafx.graphics=ALL-UNNAMED "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3\lib\idea_rt.jar=53491:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\jonat\IdeaProjects\Tawe-Lib FX\out\production\Tawe-Lib FX;C:\Program Files\Java\javafx-sdk-11.0.1\lib\src.zip;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx-swt.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.web.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.base.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.fxml.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.media.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.swing.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.controls.jar;C:\Program Files\Java\javafx-sdk-11.0.1\lib\javafx.graphics.jar" sample.Main
  Error occurred during initialization of boot layer
  java.lang.module.FindException: Module javafx.base not found
  
  Process finished with exit code 1
  </code></pre>
  
  <p>This makes little sense to me as I can see <code>javafx.base</code> under <code>lib</code> on the sidebar:
  <a href="https://i.stack.imgur.com/7ifU3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7ifU3.png" alt="enter image description here"></a></p>
  
  <p>The path leading to <code>jdk-11.0.1</code> and <code>javafx-sdk-11.0.1</code>:</p>
  
  <blockquote>
    <p>C:\Program Files\Java</p>
  </blockquote>
  
  <p>Java is installed:</p>
  
  <pre><code>C:\Users\jonat&gt;java --version
  openjdk 11.0.1 2018-10-16
  OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
  OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
  </code></pre>
  
  <p><code>JAVA_HOME</code> variable (mentioned in guide) is set:</p>
  
  <pre><code>C:\Users\jonat&gt;echo %JAVA_HOME%
  C:\Program Files\Java\jdk-11.0.1
  </code></pre>
  
  <p><code>PATH_TO_FX</code> variable is set:</p>
  
  <pre><code>C:\Users\jonat&gt;echo %PATH_TO_FX%
  C:\Program Files\Java\javafx-sdk-11.0.1\lib
  </code></pre>
  
  <p>I have really no idea where to go from here. I have followed the tutorial precisely, and it does not work. Any help would be greatly appreciated and if you require more info please just drop a comment about it.</p>