Creating Jar for JavaFX Application

This is a step by step guide to creating a Jar for a JavaFX Application using IntelliJ IDEA. It is only tested on IntelliJ IDEA 2016 with Java8. Steps might be slightly different for Java7.

First, open up File > Project Structure.

Next click on Artifacts as shown below.


Next click on the plus icon to add a Jar From modules with dependencies… as shown.


Once the above step is completed, the below pop-up will be shown. Select your main class. This will be the class that is accessed when your app launches. It is typically or something similar. Click OK twice to exit the pop-up and Project Structure.


Now to generate the jar file, go to Build > Build Artifacts…


Once you clicked on the Build Artifacts, the below will be shown, select Build for the Action. Once clicked, the jar will be generated in the folder /out/artifacts/ and you can run the jar file directly from it.


This entry was posted in Java, JavaFX and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s