Packaging JavaFX 2 Applications in IntelliJ IDEA 12.1

This is the third part of the JavaFX 2 serie about the new features coming in IntelliJ IDEA 12.1. Today we would like to show how you can prepare your application deployment bundles.

Since the last two posts we have updated the project wizard so when you create a project it comes with an already configured artifact.

If you accept to create a project and open File → Project Structure → Artifacts, you will see a configured artifact of JavaFx Application type.

You can specify to build this artifact on each make by enabling corresponding option here or you can build it manually when you need it via Build → Build Artifacts… action. Specific JavaFX settings such as Application class, Title, Vendor, etc are hidden on the JavaFX tab.

All required fields are already set for you so you can try to build your first JavaFX application right after project creation. If you need to pass additional settings you can generate an ant build via Build → Generate Ant Build… and pass everything you need in the generated build file. You can also attach an ant task to be performed on make or before any run configuration.

And the last one for today. If your application already needs a preloader you can configure additional artifact for a module with the preloader.

This artifact will ask you to specify your preloader class and define the preloader.jar layout. If you add this artifact in the JavaFx Application artifact dependencies IntelliJ IDEA will use specified preloader to prepare resulted bundle.

You need additional settings for your JavaFX applications in UI? Please don’t hesitate to ask.

Feel free to share your feedback on the discussion forum and report bugs in our issue tracker.

Develop with Pleasure!

This entry was posted in New Features and tagged , , . Bookmark the permalink.

12 Responses to Packaging JavaFX 2 Applications in IntelliJ IDEA 12.1

  1. Yuri Trukhin says:

    Thank you:)

  2. Maciej Matecki says:

    Thanks. It’s really helpful. Could you add option as for the JAR artifact (From modules with dependencies) so the MANIFEST.MF will have the Classpath property set for JavaFX artifacts.
    Cheers,
    Maciej.

  3. Anna Kozlova says:

    Maciej, sorry I am not sure that I do understand you correctly. Do you need just to configure classpath dependencies in generated manifest file when build multi-module project or module with library dependencies? Hopefully I’ve already fixed that bug.
    Thanks

  4. Gerrit says:

    Any chance to implement native packaging in the ui or do we have to use the javafx ant tasks to build native packages ?
    Cheers and keep up the great work,

    Gerrit

  5. Anna Kozlova says:

    Gerrit, ok, we do it.

  6. Anna Kozlova says:

    Done, but would be available only in 12.1.2 EAP (after 12.1.1 is out)

  7. Sebastian says:

    I’m missing 2 things here:

    1) the security that make me run in browser theres is no way I can see of configure the jnlp with

    2) as other comment, if I add the dependency jars on a lib folder the jnlp never get them and never add the path, so the poject fails to run

  8. Sebastian says:

    security
    all-permissions
    security

    the previous comment had this missing for the 1 thing

  9. Danno Ferrin says:

    What are your plans (if any) for the packaging updates coming in 8u20? Ping me offline if desired.

  10. lavan says:

    Hi,

    How will i run then app then ? can someone please explain completely with a simple example.

    Thanks in advance

    Lavan

  11. Costas says:

    How about including a native icon file for each bundle? In netbeans it is match easier to set an icon file without writing any single line of ant etc. I find it very hard to do so in intellij and I am thinking of switching to netbeans just because of that. Please give a (working) example of setting up an icon.

  12. Alex Zaldivar says:

    I second what Costas wrote. Give an example because NetBeans does this already.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">