Making a JavaFX Artifacts



I'm trying to make a executable javaFx file with Intellij 13.1.4 and java SDK 1.6 but i can't get it to work.

When i try to Build Artifacts i get this error

Error:Java FX Packager: Unable to build JavaFX artifact. Application class should be specified in artifact's settings.

And when i go to File - Project Structure and the Java FX i find a Application Class but nothing i choose will work here. I always get the error "TestMain is not acceptable" where TestMain is the file width my public static void main method in.

Any help would be appreciated.

Best regards
Thomas vestergaard

Comment actions Permalink

Hi Thomas,

jdk 1.6 doesn't include javafx by default in distribution that's why IntelliJ IDEA assumes that at least java 1.7 is used. Could you please try to use jdk 1.7?


Comment actions Permalink


I am aware this is old question but thought it would still be useful to provide help for others who stumble upon it.

  • In Project Structure window, Project Settings list (on the left) choose Artifacts. In upper right corner you will see "Type" drop down. It should be set to JavaFx Application.
  • In central part of same window you will notice 4 tabs: OutputLayout, Pre-Processing, Post-Processing and Java FX
  • On OutputLayout tab you can select XYZ.jar in output root tree and manifest should be already created. If it is not create new one and set its main class.
  • Selecting JavaFx tab will allow you to set Application class, as well as some additional details like title, vendor, description, version etc.. 

p.s. This issue can happen independently of JDK (i.e with 1.8 too) 

Comment actions Permalink

Just make sure to explicitly state the file path in the JavaFX tab, especially if it's not auto-completing and selecting the Application class. 



Please sign in to leave a comment.