Intellij Javafx artifact - how do you make it?

Posted by Louis Sayers on Stack Overflow See other posts from Stack Overflow or by Louis Sayers
Published on 2012-09-02T15:35:23Z Indexed on 2012/09/02 15:37 UTC
Read the original article Hit count: 685

Filed under:
|
|

I've been trying all day to turn my javafx application into a jar file. I'm using Java 1.7 update 7.

Oracle has some information, but it just seems scattered all over the place. Intellij is almost doing the job, but I get the following error:

java.lang.NoClassDefFoundError: javafx/application/Application

Which seems to say that I need to tell java where the jfxrt.jar is... If I add this jar to my classpath info for the manifest build in intellij - ctrl+shift+alt+s -> Artifacts -> Output Layout tab -> Class Path, then I get another error:

 Could not find or load main class com.downloadpinterest.code.Main

It seems strange to have to include jfxrt.jar in my class path though...

I've tried to create an ant script as well, but I feel like IntelliJ is 90% of the way there - and I just need a bit of help to figure out why I need to include jfxrt.jar, and why my Main class isn't being found (I'm guessing I need to add it to the classpath somehow?).

Could anyone clue me up as to what is happening? I had a basic gui before which worked fine, but JavaFX seems to be making life complicated!

© Stack Overflow or respective owner

Related posts about jar

Related posts about intellij-idea