title: JavaFX11 and Intellij
body: <p>I followed the instruction in this link 
  <a href="https://openjfx.io/openjfx-docs/#install-javafx" rel="nofollow noreferrer">https://openjfx.io/openjfx-docs/#install-javafx</a> 
  and when i run javafx sample i get this error</p>
  
  <pre><code>Error:(3, 26) java: cannot access javafx.application.Application
    bad class file: C:\Program Files\Java\OpenJDK\javafx-sdk-11.0.1\lib\javafx.graphics.jar(javafx/application/Application.class)
      class file has wrong version 54.0, should be 52.0
      Please remove or make sure it appears in the correct subdirectory of the classpath.
  </code></pre>
  
  <p>and when i go to Project Structure > Project/Modules the JDK is set to JDK11
  VM option:</p>
  
  <pre><code>--module-path C:\Program Files\Java\OpenJDK\javafx-sdk-11.0.1\lib --add-modules=javafx.controls,javafx.fxml
  </code></pre>
  
  <p>I tried to go to Settings > Build, Execution, Deployment > Compiler > Java Compiler
  Project bytecode version was set to 8 and i changed it to 11 and the first error was gone but i got new error</p>
  
  <pre><code>Error:java: invalid target release: 11
  </code></pre>
  
  <p>I was searching on the internet and somebody said go to <code>.idea\compiler.xml</code> and set target to 11 but it's already set to 11 for me but i get the error</p>