Question

I am having a hard time trying to build my javafx app into .app (for mac). I found a legit way to do that, here is resource for that: http://docs.oracle.com/javafx/2/deployment/deploy_quick_start.htm However, it is far from what I'm looking for. By following that tutorial, I managed to build an app from my javafx project, however the size of file was just ridiculous and it is because the whole JRE is being bundled inside. I am now looking for a way to deploy .app file with dependencies (it's important) ONLY and without JRE. (JRE should be pre-installed by user). Is there a way to do that? I really tried to find one, but faild. Hope you, guys, help me.

Was it helpful?

Solution

Instructions for packaging a JavaFX application as a native installable app without including a JRE:

JavaFX packaging tools update - Self-Contained Applications: Create Package without Java Runtime.

The tools used are the same as from the deployment quick start you mention in your question. You just set the fx:platform basedir="".

I'll just quote the article here:

This may sound a bit puzzling at first glance. Package without embedded Java Runtime is not really self-contained and obviously will not help with:

  • Deployment on fresh systems. JRE need to be installed separately (and this step will require admin permissions).
  • Possible compatibility issues due to updates of system runtime.

However, these packages are much much smaller in size. If download size matters and you are confident that user have recommended system JRE installed then this may be good option to consider if you want to improve user experience for install and launch.

Technically, this is implemented as an extension of previous feature. Pass empty string as value for 'basedir' attribute and this will be treated as request to not bundle Java runtime, e.g.

<fx:platform basedir=""/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top