Building JavaFX 2.0 App on Mac, deploying on Windo

2019-05-30 16:50发布

What are your strategies for building your JavaFX application on Mac and deploying on Windows ? I am currently having issues with how to bundle up my application so that it is double clickable on both platforms. I have tried using the ant-tools, but the jar file produced complain that JavaFX 2.1 needs to be installed on my Mac (how can I place the JavaFX 2.1 DP distribution so that the double-clickable Jar knows where to find it ?)

On the Windows side, Java7u3 is installed, which "comes with" Java FX 2.0.3. I need for the application to be able to execute as a double clickable JAR file here as well.

Any suggestions as to how this is set up ? I am using Maven to build my project. The more details you can provide the better.

标签: javafx-2
1条回答
ら.Afraid
2楼-- · 2019-05-30 17:24

Since 2.1 release the only (official) way to install JavaFX on Mac is cobundle installation with Java 7u4 (opposite to developers preview versions being published in zip archives).

If JavaFX on Mac was installed this way then jar with JavaFX can be run by double-click.

On Windows same jar by double-click will ask to install "JavaFX runtime" and will start if one is present already.

N.B.: in 2.2 release Mac/Linux would start to support jnlp (WebStart) run (already supported on Windows) which may suit you even better.

查看更多
登录 后发表回答