Intellij can't recognize javafx 11 with OpenJDK 11












20














Having trouble getting Intellj to recognize javafx packages. With a new javafx project, with OpenJDK 11, when trying to build the project Intellij can't recognize the javafx packages.



I've imported openjfx:javafx-base-11 from the maven repo.



I've looked at other questions, and the solutions seem to range from checking the bytecode is at the right level (mine is), project language is correct (mine is).



Anyone have any ideas?



pic 1



pic 2



pic 3



edit:



error:



enter image description here










share|improve this question
























  • can you try from terminal to compile and run?
    – drowny
    Sep 23 '18 at 15:35










  • You'll need to require its module(s) in your module-info.java
    – Jacob G.
    Sep 23 '18 at 15:36










  • I think you need this artifact: mvnrepository.com/artifact/org.openjfx/javafx/11 the base one doesn't contain everything I guess.
    – Jorn Vernee
    Sep 23 '18 at 15:36










  • @JornVernee when I try that I get an error. I edited the OP with it.
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41










  • @JacobG. how do I go about this? I have not used the module system before. I was told that you don't require a modulized application to use javaFX11. Is this wrong?
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41
















20














Having trouble getting Intellj to recognize javafx packages. With a new javafx project, with OpenJDK 11, when trying to build the project Intellij can't recognize the javafx packages.



I've imported openjfx:javafx-base-11 from the maven repo.



I've looked at other questions, and the solutions seem to range from checking the bytecode is at the right level (mine is), project language is correct (mine is).



Anyone have any ideas?



pic 1



pic 2



pic 3



edit:



error:



enter image description here










share|improve this question
























  • can you try from terminal to compile and run?
    – drowny
    Sep 23 '18 at 15:35










  • You'll need to require its module(s) in your module-info.java
    – Jacob G.
    Sep 23 '18 at 15:36










  • I think you need this artifact: mvnrepository.com/artifact/org.openjfx/javafx/11 the base one doesn't contain everything I guess.
    – Jorn Vernee
    Sep 23 '18 at 15:36










  • @JornVernee when I try that I get an error. I edited the OP with it.
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41










  • @JacobG. how do I go about this? I have not used the module system before. I was told that you don't require a modulized application to use javaFX11. Is this wrong?
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41














20












20








20


15





Having trouble getting Intellj to recognize javafx packages. With a new javafx project, with OpenJDK 11, when trying to build the project Intellij can't recognize the javafx packages.



I've imported openjfx:javafx-base-11 from the maven repo.



I've looked at other questions, and the solutions seem to range from checking the bytecode is at the right level (mine is), project language is correct (mine is).



Anyone have any ideas?



pic 1



pic 2



pic 3



edit:



error:



enter image description here










share|improve this question















Having trouble getting Intellj to recognize javafx packages. With a new javafx project, with OpenJDK 11, when trying to build the project Intellij can't recognize the javafx packages.



I've imported openjfx:javafx-base-11 from the maven repo.



I've looked at other questions, and the solutions seem to range from checking the bytecode is at the right level (mine is), project language is correct (mine is).



Anyone have any ideas?



pic 1



pic 2



pic 3



edit:



error:



enter image description here







java intellij-idea javafx java-11 javafx-11






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 12 '18 at 20:21









Mikhail Kholodkov

4,13952546




4,13952546










asked Sep 23 '18 at 15:25









AlwaysNeedingHelp

310517




310517












  • can you try from terminal to compile and run?
    – drowny
    Sep 23 '18 at 15:35










  • You'll need to require its module(s) in your module-info.java
    – Jacob G.
    Sep 23 '18 at 15:36










  • I think you need this artifact: mvnrepository.com/artifact/org.openjfx/javafx/11 the base one doesn't contain everything I guess.
    – Jorn Vernee
    Sep 23 '18 at 15:36










  • @JornVernee when I try that I get an error. I edited the OP with it.
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41










  • @JacobG. how do I go about this? I have not used the module system before. I was told that you don't require a modulized application to use javaFX11. Is this wrong?
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41


















  • can you try from terminal to compile and run?
    – drowny
    Sep 23 '18 at 15:35










  • You'll need to require its module(s) in your module-info.java
    – Jacob G.
    Sep 23 '18 at 15:36










  • I think you need this artifact: mvnrepository.com/artifact/org.openjfx/javafx/11 the base one doesn't contain everything I guess.
    – Jorn Vernee
    Sep 23 '18 at 15:36










  • @JornVernee when I try that I get an error. I edited the OP with it.
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41










  • @JacobG. how do I go about this? I have not used the module system before. I was told that you don't require a modulized application to use javaFX11. Is this wrong?
    – AlwaysNeedingHelp
    Sep 23 '18 at 15:41
















can you try from terminal to compile and run?
– drowny
Sep 23 '18 at 15:35




can you try from terminal to compile and run?
– drowny
Sep 23 '18 at 15:35












You'll need to require its module(s) in your module-info.java
– Jacob G.
Sep 23 '18 at 15:36




You'll need to require its module(s) in your module-info.java
– Jacob G.
Sep 23 '18 at 15:36












I think you need this artifact: mvnrepository.com/artifact/org.openjfx/javafx/11 the base one doesn't contain everything I guess.
– Jorn Vernee
Sep 23 '18 at 15:36




I think you need this artifact: mvnrepository.com/artifact/org.openjfx/javafx/11 the base one doesn't contain everything I guess.
– Jorn Vernee
Sep 23 '18 at 15:36












@JornVernee when I try that I get an error. I edited the OP with it.
– AlwaysNeedingHelp
Sep 23 '18 at 15:41




@JornVernee when I try that I get an error. I edited the OP with it.
– AlwaysNeedingHelp
Sep 23 '18 at 15:41












@JacobG. how do I go about this? I have not used the module system before. I was told that you don't require a modulized application to use javaFX11. Is this wrong?
– AlwaysNeedingHelp
Sep 23 '18 at 15:41




@JacobG. how do I go about this? I have not used the module system before. I was told that you don't require a modulized application to use javaFX11. Is this wrong?
– AlwaysNeedingHelp
Sep 23 '18 at 15:41












1 Answer
1






active

oldest

votes


















42














As mentioned in the comments, the Starting Guide is the place to start with Java 11 and JavaFX 11.



The key to work as you did before Java 11 is to understand that:




  • JavaFX 11 is not part of the JDK anymore

  • You can get it in different flavors, either as an SDK or as
    regular dependencies (maven/gradle).

  • You will need to include it to the module path of your project, even if your project is not modular.


JavaFX project



If you create a regular JavaFX default project in IntelliJ (without Maven or Gradle) I'd suggest you download the SDK from here. Note that there are jmods as well, but for a non modular project the SDK is preferred.



These are the easy steps to run the default project:




  1. Create a JavaFX project

  2. Set JDK 11 (point to your local Java 11 version)

  3. Add the JavaFX 11 SDK as a library. The URL could be something like /Users/<user>/Downloads/javafx-sdk-11/lib/. Once you do this you will notice that the JavaFX classes are now recognized in the editor.


JavaFX 11 Project





  1. Before you run the default project, you just need to add these to the VM options:



    --module-path /Users/<user>/Downloads/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml



  2. Run



Maven



If you use Maven to build your project, follow these steps:




  1. Create a Maven project with JavaFX archetype

  2. Set JDK 11 (point to your local Java 11 version)


  3. Add the JavaFX 11 dependencies.



    <dependencies>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-controls</artifactId>
    <version>11</version>
    </dependency>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-fxml</artifactId>
    <version>11</version>
    </dependency>
    </dependencies>



Once you do this you will notice that the JavaFX classes are now recognized in the editor.



JavaFX 11 Maven project



You will notice that Maven manages the required dependencies for you: it will add javafx.base and javafx.graphics for javafx.controls, but most important, it will add the required classifier based on your platform. In my case, Mac.



This is why your jars org.openjfx:javafx-controls:11 are empty, because there are three possible classifiers (windows, linux and mac platforms), that contain all the classes and the native implementation.



In case you still want to go to your .m2 repo and take the dependencies from there manually, make sure you pick the right one (for instance .m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-mac.jar)




  1. Replace default maven plugins with those from here.


  2. Run mvn compile exec:java, and it should work.



Similar works as well for Gradle projects, as explained in detail here.



EDIT



The mentioned Getting Started guide contains updated documentation and sample projects for IntelliJ:




  • JavaFX 11 without Maven/Gradle, see non-modular sample or modular sample projects.


  • JavaFX 11 with Maven, see non-modular sample or modular sample projects.


  • JavaFX 11 with Gradle, see non-modular sample or modular sample projects.







share|improve this answer























  • I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
    – Jack J
    Oct 6 '18 at 19:24






  • 1




    Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
    – José Pereda
    Oct 6 '18 at 19:26






  • 3




    If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
    – Jalau
    Oct 25 '18 at 10:58










  • Very cool. Has anyone managed to get the install artifact working?
    – sproketboy
    Nov 9 '18 at 18:17












  • Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
    – Davide3i
    Dec 22 '18 at 17:22










protected by kleopatra Nov 5 '18 at 9:21



Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



Would you like to answer one of these unanswered questions instead?














1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









42














As mentioned in the comments, the Starting Guide is the place to start with Java 11 and JavaFX 11.



The key to work as you did before Java 11 is to understand that:




  • JavaFX 11 is not part of the JDK anymore

  • You can get it in different flavors, either as an SDK or as
    regular dependencies (maven/gradle).

  • You will need to include it to the module path of your project, even if your project is not modular.


JavaFX project



If you create a regular JavaFX default project in IntelliJ (without Maven or Gradle) I'd suggest you download the SDK from here. Note that there are jmods as well, but for a non modular project the SDK is preferred.



These are the easy steps to run the default project:




  1. Create a JavaFX project

  2. Set JDK 11 (point to your local Java 11 version)

  3. Add the JavaFX 11 SDK as a library. The URL could be something like /Users/<user>/Downloads/javafx-sdk-11/lib/. Once you do this you will notice that the JavaFX classes are now recognized in the editor.


JavaFX 11 Project





  1. Before you run the default project, you just need to add these to the VM options:



    --module-path /Users/<user>/Downloads/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml



  2. Run



Maven



If you use Maven to build your project, follow these steps:




  1. Create a Maven project with JavaFX archetype

  2. Set JDK 11 (point to your local Java 11 version)


  3. Add the JavaFX 11 dependencies.



    <dependencies>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-controls</artifactId>
    <version>11</version>
    </dependency>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-fxml</artifactId>
    <version>11</version>
    </dependency>
    </dependencies>



Once you do this you will notice that the JavaFX classes are now recognized in the editor.



JavaFX 11 Maven project



You will notice that Maven manages the required dependencies for you: it will add javafx.base and javafx.graphics for javafx.controls, but most important, it will add the required classifier based on your platform. In my case, Mac.



This is why your jars org.openjfx:javafx-controls:11 are empty, because there are three possible classifiers (windows, linux and mac platforms), that contain all the classes and the native implementation.



In case you still want to go to your .m2 repo and take the dependencies from there manually, make sure you pick the right one (for instance .m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-mac.jar)




  1. Replace default maven plugins with those from here.


  2. Run mvn compile exec:java, and it should work.



Similar works as well for Gradle projects, as explained in detail here.



EDIT



The mentioned Getting Started guide contains updated documentation and sample projects for IntelliJ:




  • JavaFX 11 without Maven/Gradle, see non-modular sample or modular sample projects.


  • JavaFX 11 with Maven, see non-modular sample or modular sample projects.


  • JavaFX 11 with Gradle, see non-modular sample or modular sample projects.







share|improve this answer























  • I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
    – Jack J
    Oct 6 '18 at 19:24






  • 1




    Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
    – José Pereda
    Oct 6 '18 at 19:26






  • 3




    If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
    – Jalau
    Oct 25 '18 at 10:58










  • Very cool. Has anyone managed to get the install artifact working?
    – sproketboy
    Nov 9 '18 at 18:17












  • Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
    – Davide3i
    Dec 22 '18 at 17:22
















42














As mentioned in the comments, the Starting Guide is the place to start with Java 11 and JavaFX 11.



The key to work as you did before Java 11 is to understand that:




  • JavaFX 11 is not part of the JDK anymore

  • You can get it in different flavors, either as an SDK or as
    regular dependencies (maven/gradle).

  • You will need to include it to the module path of your project, even if your project is not modular.


JavaFX project



If you create a regular JavaFX default project in IntelliJ (without Maven or Gradle) I'd suggest you download the SDK from here. Note that there are jmods as well, but for a non modular project the SDK is preferred.



These are the easy steps to run the default project:




  1. Create a JavaFX project

  2. Set JDK 11 (point to your local Java 11 version)

  3. Add the JavaFX 11 SDK as a library. The URL could be something like /Users/<user>/Downloads/javafx-sdk-11/lib/. Once you do this you will notice that the JavaFX classes are now recognized in the editor.


JavaFX 11 Project





  1. Before you run the default project, you just need to add these to the VM options:



    --module-path /Users/<user>/Downloads/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml



  2. Run



Maven



If you use Maven to build your project, follow these steps:




  1. Create a Maven project with JavaFX archetype

  2. Set JDK 11 (point to your local Java 11 version)


  3. Add the JavaFX 11 dependencies.



    <dependencies>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-controls</artifactId>
    <version>11</version>
    </dependency>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-fxml</artifactId>
    <version>11</version>
    </dependency>
    </dependencies>



Once you do this you will notice that the JavaFX classes are now recognized in the editor.



JavaFX 11 Maven project



You will notice that Maven manages the required dependencies for you: it will add javafx.base and javafx.graphics for javafx.controls, but most important, it will add the required classifier based on your platform. In my case, Mac.



This is why your jars org.openjfx:javafx-controls:11 are empty, because there are three possible classifiers (windows, linux and mac platforms), that contain all the classes and the native implementation.



In case you still want to go to your .m2 repo and take the dependencies from there manually, make sure you pick the right one (for instance .m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-mac.jar)




  1. Replace default maven plugins with those from here.


  2. Run mvn compile exec:java, and it should work.



Similar works as well for Gradle projects, as explained in detail here.



EDIT



The mentioned Getting Started guide contains updated documentation and sample projects for IntelliJ:




  • JavaFX 11 without Maven/Gradle, see non-modular sample or modular sample projects.


  • JavaFX 11 with Maven, see non-modular sample or modular sample projects.


  • JavaFX 11 with Gradle, see non-modular sample or modular sample projects.







share|improve this answer























  • I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
    – Jack J
    Oct 6 '18 at 19:24






  • 1




    Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
    – José Pereda
    Oct 6 '18 at 19:26






  • 3




    If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
    – Jalau
    Oct 25 '18 at 10:58










  • Very cool. Has anyone managed to get the install artifact working?
    – sproketboy
    Nov 9 '18 at 18:17












  • Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
    – Davide3i
    Dec 22 '18 at 17:22














42












42








42






As mentioned in the comments, the Starting Guide is the place to start with Java 11 and JavaFX 11.



The key to work as you did before Java 11 is to understand that:




  • JavaFX 11 is not part of the JDK anymore

  • You can get it in different flavors, either as an SDK or as
    regular dependencies (maven/gradle).

  • You will need to include it to the module path of your project, even if your project is not modular.


JavaFX project



If you create a regular JavaFX default project in IntelliJ (without Maven or Gradle) I'd suggest you download the SDK from here. Note that there are jmods as well, but for a non modular project the SDK is preferred.



These are the easy steps to run the default project:




  1. Create a JavaFX project

  2. Set JDK 11 (point to your local Java 11 version)

  3. Add the JavaFX 11 SDK as a library. The URL could be something like /Users/<user>/Downloads/javafx-sdk-11/lib/. Once you do this you will notice that the JavaFX classes are now recognized in the editor.


JavaFX 11 Project





  1. Before you run the default project, you just need to add these to the VM options:



    --module-path /Users/<user>/Downloads/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml



  2. Run



Maven



If you use Maven to build your project, follow these steps:




  1. Create a Maven project with JavaFX archetype

  2. Set JDK 11 (point to your local Java 11 version)


  3. Add the JavaFX 11 dependencies.



    <dependencies>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-controls</artifactId>
    <version>11</version>
    </dependency>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-fxml</artifactId>
    <version>11</version>
    </dependency>
    </dependencies>



Once you do this you will notice that the JavaFX classes are now recognized in the editor.



JavaFX 11 Maven project



You will notice that Maven manages the required dependencies for you: it will add javafx.base and javafx.graphics for javafx.controls, but most important, it will add the required classifier based on your platform. In my case, Mac.



This is why your jars org.openjfx:javafx-controls:11 are empty, because there are three possible classifiers (windows, linux and mac platforms), that contain all the classes and the native implementation.



In case you still want to go to your .m2 repo and take the dependencies from there manually, make sure you pick the right one (for instance .m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-mac.jar)




  1. Replace default maven plugins with those from here.


  2. Run mvn compile exec:java, and it should work.



Similar works as well for Gradle projects, as explained in detail here.



EDIT



The mentioned Getting Started guide contains updated documentation and sample projects for IntelliJ:




  • JavaFX 11 without Maven/Gradle, see non-modular sample or modular sample projects.


  • JavaFX 11 with Maven, see non-modular sample or modular sample projects.


  • JavaFX 11 with Gradle, see non-modular sample or modular sample projects.







share|improve this answer














As mentioned in the comments, the Starting Guide is the place to start with Java 11 and JavaFX 11.



The key to work as you did before Java 11 is to understand that:




  • JavaFX 11 is not part of the JDK anymore

  • You can get it in different flavors, either as an SDK or as
    regular dependencies (maven/gradle).

  • You will need to include it to the module path of your project, even if your project is not modular.


JavaFX project



If you create a regular JavaFX default project in IntelliJ (without Maven or Gradle) I'd suggest you download the SDK from here. Note that there are jmods as well, but for a non modular project the SDK is preferred.



These are the easy steps to run the default project:




  1. Create a JavaFX project

  2. Set JDK 11 (point to your local Java 11 version)

  3. Add the JavaFX 11 SDK as a library. The URL could be something like /Users/<user>/Downloads/javafx-sdk-11/lib/. Once you do this you will notice that the JavaFX classes are now recognized in the editor.


JavaFX 11 Project





  1. Before you run the default project, you just need to add these to the VM options:



    --module-path /Users/<user>/Downloads/javafx-sdk-11/lib --add-modules=javafx.controls,javafx.fxml



  2. Run



Maven



If you use Maven to build your project, follow these steps:




  1. Create a Maven project with JavaFX archetype

  2. Set JDK 11 (point to your local Java 11 version)


  3. Add the JavaFX 11 dependencies.



    <dependencies>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-controls</artifactId>
    <version>11</version>
    </dependency>
    <dependency>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-fxml</artifactId>
    <version>11</version>
    </dependency>
    </dependencies>



Once you do this you will notice that the JavaFX classes are now recognized in the editor.



JavaFX 11 Maven project



You will notice that Maven manages the required dependencies for you: it will add javafx.base and javafx.graphics for javafx.controls, but most important, it will add the required classifier based on your platform. In my case, Mac.



This is why your jars org.openjfx:javafx-controls:11 are empty, because there are three possible classifiers (windows, linux and mac platforms), that contain all the classes and the native implementation.



In case you still want to go to your .m2 repo and take the dependencies from there manually, make sure you pick the right one (for instance .m2/repository/org/openjfx/javafx-controls/11/javafx-controls-11-mac.jar)




  1. Replace default maven plugins with those from here.


  2. Run mvn compile exec:java, and it should work.



Similar works as well for Gradle projects, as explained in detail here.



EDIT



The mentioned Getting Started guide contains updated documentation and sample projects for IntelliJ:




  • JavaFX 11 without Maven/Gradle, see non-modular sample or modular sample projects.


  • JavaFX 11 with Maven, see non-modular sample or modular sample projects.


  • JavaFX 11 with Gradle, see non-modular sample or modular sample projects.








share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 27 '18 at 17:43

























answered Sep 23 '18 at 20:49









José Pereda

25.1k34068




25.1k34068












  • I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
    – Jack J
    Oct 6 '18 at 19:24






  • 1




    Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
    – José Pereda
    Oct 6 '18 at 19:26






  • 3




    If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
    – Jalau
    Oct 25 '18 at 10:58










  • Very cool. Has anyone managed to get the install artifact working?
    – sproketboy
    Nov 9 '18 at 18:17












  • Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
    – Davide3i
    Dec 22 '18 at 17:22


















  • I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
    – Jack J
    Oct 6 '18 at 19:24






  • 1




    Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
    – José Pereda
    Oct 6 '18 at 19:26






  • 3




    If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
    – Jalau
    Oct 25 '18 at 10:58










  • Very cool. Has anyone managed to get the install artifact working?
    – sproketboy
    Nov 9 '18 at 18:17












  • Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
    – Davide3i
    Dec 22 '18 at 17:22
















I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
– Jack J
Oct 6 '18 at 19:24




I am having trouble with JavaFX Project Step 3. Project Structure -> Project Settings -> Libraries -> + (New Project Library) -> Java. Then input path to javafx-sdk-11, correct? Then, "IDEA cannot determine what kind of files the chosen items contain. Choose the appropriate categories from the list."
– Jack J
Oct 6 '18 at 19:24




1




1




Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
– José Pereda
Oct 6 '18 at 19:26




Path is something like /Users/<user>/Downloads/javafx-sdk-11/lib/, notice the lib folder. That should contain all the javafx jars
– José Pereda
Oct 6 '18 at 19:26




3




3




If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
– Jalau
Oct 25 '18 at 10:58




If anyone is having issues with the module path it needs to look something like this on windows: --module-path="C:PathToYourJavaFXlib" --add-modules=javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.graphics,javafx.swing,javafx.web Notice the "=" and also the quotes around it. This worked for me while any other approach didn't. Furthermore keep in mind that the -jar YourJar.jar parameter needs to come AFTER the module path and add-modules options.
– Jalau
Oct 25 '18 at 10:58












Very cool. Has anyone managed to get the install artifact working?
– sproketboy
Nov 9 '18 at 18:17






Very cool. Has anyone managed to get the install artifact working?
– sproketboy
Nov 9 '18 at 18:17














Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
– Davide3i
Dec 22 '18 at 17:22




Hi @JoséPereda. I've been struggling with this guide since a while, but I can't really make IntelliJ run my code, even if I've done exactly what you've written. I'm still getting "Error:java: module not found: javafx.fxml" and so on. Any chance to have a private chat to help me out sort out this issue? Thank you.
– Davide3i
Dec 22 '18 at 17:22





protected by kleopatra Nov 5 '18 at 9:21



Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



Would you like to answer one of these unanswered questions instead?



Popular posts from this blog

Mossoró

Error while reading .h5 file using the rhdf5 package in R

Pushsharp Apns notification error: 'InvalidToken'