I followed the instruction in this link https://openjfx.io/openjfx-docs/#install-javafx and when i run javafx sample i get this error
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.
and when i go to Project Structure > Project/Modules the JDK is set to JDK11 VM option:
--module-path C:\Program Files\Java\OpenJDK\javafx-sdk-11.0.1\lib --add-modules=javafx.controls,javafx.fxml
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
Error:java: invalid target release: 11
I was searching on the internet and somebody said go to .idea\compiler.xml
and set target to 11 but it's already set to 11 for me but i get the error