Question

How can I configure my intellij IDE to point to JavaFX SDK ?

Was it helpful?

Solution

Recommendation - Use a Later Java Version (7u6+) and Idea's native JavaFX support

At a minimum, use an Intellij Idea version that includes JavaFX support (e.g. Intellij Idea 12.1+), together with a JavaFX distribution which the Intellij Idea JavaFX plugin supports (I believe that's Java 7u6+).

Using the latest stable versions of both of these tools will likely provide the best results.

Setup and use documentation for the Intellij Idea JavaFX 2.x+ plugin is provided by JetBrains.

As Java7u6+ includes JavaFX, you don't need to install and use a separate JavaFX SDK such as the Java 1.6 JavaFX SDK linked in your question.

If you must use Java 6

This approach is not recommended.

Install the JavaFX SDK and use the JavaFX ant tasks to build and deploy your application. You could also search for the jfxrt.jar file in the distribution and create a library added to your idea module's compile classpath. This makes Idea aware of the JavaFX classes.

Some things to consider:

  1. Unlike later JavaFX releases, the JavaFX 2.x SDK for Java 6 only works on Windows.
  2. After February 2013, Oracle will no longer post updates of Java SE 6 to its public download sites. "Existing Java SE 6 downloads already posted as of February 2013 will remain accessible in the Java Archive on Oracle Technology Network. Developers and end-users are encouraged to update to more recent Java SE versions that remain available for public download."

The above considerations may make it difficult to distribute to end users any application you build based on Java 6 + the JavaFX SDK for Java 6 (as it may be hard for them to obtain and install the appropriate runtime).

You can see this policy in practice already as the latest version of the JavaFX SDK for Java6 is 2.2u21, whereas the latest version of the JavaFX SDK in Java 7 is 2.2u25 (therefore the publicly available JavaFX SDK for Java 6 is not receiving the latest feature and security patches which the Java 7 version is currently receiving).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top