Versions Compared

Key

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

...

OpenJFX is based on JDK1.8 and IDE support for lambdas and default methods currently requires that you get a pre-release version. IntelliJ supports this out of the box. Eclipse and NetBeans do not.

IntelliJ: http://www.jetbrains.com/idea/download/

Eclipse: http://downloads.efxclipse.org/eclipse-java8/

NetBeans: http://bits.netbeans.org/dev/nightly/

    - this version works on Mac: netbeans-trunk-nightly-201305192300-javase-macosx.dmg
    - this version works on Windows: netbeans-trunk-nightly-201305192300-javase-windows.exe
    - this versions works on Linux: netbeans-trunk-nightly-201306252301-javase-linux.sh
    - other versions are likely to work but these are the ones that have been tested

IntelliJ: http://www.jetbrains.com/idea/download/

Eclipse: http://downloads.efxclipse.org/eclipse-java8/

Once you have downloaded and installed an IDE that is JDK8 aware, you will need to configure it to accept JDK8 syntax and generate the right byte codes.  This will be explained later on for each particular IDE.  If you use an IDE without JDK8 support, such as NetBeans 3.7.1, you will not be able to run from within the IDE.

...

Move jfxrt.jar

...

to a standard cache directory

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. For more information on why this is a problem, see Unique Challenges of Working on the JDK.

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 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 cacheBy moving jfxrt.jar to a standard cache directory, your IDE can reference it:

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

Using NetBeans

Many commiters are using NetBeans to develop Java and native code.  NetBeans projects have been configured for both.  Native projects in NetBeans are currently not configured to build using either Make or gradle, however ant build works in NetBeans and will build the classes and jar files needed for the IDE.

...

  • Edit netbeans.conf
  • Invoke NetBeans
  • Add the JDK8 Platform
  • Import NetBeans projects
  • Rebuild
  • Run sample code
  • Run sample code with grade built shared libraries (optional)

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.

...

  • 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

Add jfxrt.jar to the Class Path

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

Image Removed

Export the Jar to the other modules

Image Removed

Make

Build->Make Project

Run Sample Code

Run Sample Code with Gradle Built Shared Libraries

...

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

...