Making a JavaFX Artifacts

Answered

Hello

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

0
7 comments

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?

Thanks,
Anna

0
Avatar
Permanently deleted user

Hi,

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) 

0
Avatar
Permanently deleted user

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. 

 

0

I have a another problem, I have only the Output layout tab

1

Izhukov2007

It is a known bug in the latest versions of the IDE, see:

It will be fixed in the upcoming EAP releases. Apologies for the inconvenience.

0

Arina Efremova

So, how to counter this issue the time the bug will be fixed?

 

0

Please sign in to leave a comment.