...
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
...
...
Edit netbeans.conf
We have found the nightly versions of NetBeans to be unstable under JDK8, but fine otherwise. Further, NetBeans needs to be told not to report errors when private JDK classes referenced. The netbeans.conf file is located in the etc directory of your NetBeans install. You will edit netbeans_default_options and netbeans_jdkhome.
Here is a sample file from the Mac. The Windows and Linux default options might be a bit different.
Invoke NetBeans
Add the JDK8
ConfigurationPlatform
Import the NetBeans Projects
Rebuild
Run Sample Code
Run Sample Code with gradle built shared libraries