Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JavaFX is bundled with the JDK as an extension.  The jfxrt.jar is located in the extension directory called 'ext' where Java is installed.  You must remove it from this directory for the IDE's to work properly.  The issue is this:  If jfxrt.jar is in the extension directory, it will get seen before the code in your IDE.  This means you won't be running or testing anything.

You  You can make a copy of your current JDK, remove the jar and tell your IDE to use this JDK instead.  Another strategy is to keep the jar around but move it into a sibling 'ext2' directly so that paths can easily be changed manually to use it and you can restore it when necessary.  Regardless, if you do not remove jfxrt.jar, you will get strange errors.

IntelliJ

quickly when necessary.  Regardless, if you do not remove jfxrt.jar, you will get strange errors.

Another strategy is to copy it to an artifacts cache:

  • cd <PATH TO JFX>
  • mkdir -p artifacts/sdk/rt/lib/ext
  • cp <PATH TO JDK>jre/lib/ext/jfxrt.jar artifacts/sdk/rt/lib/ext

IntelliJ

IntelliJ is a popular IDE that supports Java development.  An IntelliJ project has been created for you that you need to open.  The steps to use IntelliJ are:

  • Open the IntelliJ Project
  • Add jfxrt.jar to the Class Path
  • Export the Jar to the other modules
  • Make 
  • Run sample code
  • Run sample code with grade built shared libraries (optional)

Open the IntelliJ Project

<IMAGE>

Add jfxrt.jar to the Class Path

Project Structure->Modules->buildSrc->Dependencies->+->Jars or Directories

<IMAGE>

Export the Jar to the other modules

<IMAGE>

Make

Build->Make Project

<IMAGE>

Run sample code

<IMAGE>

Run sample code with grade built shared libraries (optional)

//TODO - explain how to hook up the shared libraries in the run dialog//TODO - document support

Eclipse

//TODO - document support

...

...