在Mac上构建JavaFX 2.0 App,并在Windows上进行部署 [英] Building JavaFX 2.0 App on Mac, deploying on Windows

查看:174
本文介绍了在Mac上构建JavaFX 2.0 App,并在Windows上进行部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac上构建JavaFX应用程序并在Windows上进行部署的策略是什么?我目前在如何捆绑我的应用程序方面存在问题,以便在两个平台上都可以双击它.我曾尝试使用蚂蚁工具,但产生的jar文件抱怨JavaFX 2.1需要安装在我的Mac上(如何放置JavaFX 2.1 DP发行版,以便双击的Jar知道在哪里可以找到它?)

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 ?)

在Windows端,安装了Java7u3,它随Java FX 2.0.3一起提供.我还需要该应用程序能够在此处作为可双击的JAR文件执行.

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.

关于如何设置的任何建议?我正在使用Maven构建我的项目.您可以提供的详细信息越多越好.

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.

推荐答案

自2.1版本发布以来,在Mac上安装JavaFX的唯一(官方)方法是与Java 7u4捆绑安装(与开发人员预览版本相反,这些版本正在zip存档中发布).

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).

如果以这种方式安装了Mac上的JavaFX,则可以双击运行带有JavaFX的jar.

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

在Windows上,双击同一jar会要求安装"JavaFX运行时",如果已经存在,则会启动.

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

注:在2.2版本中,Mac/Linux将开始支持jnlp(WebStart)运行(Windows已支持),这可能会更适合您.

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.

这篇关于在Mac上构建JavaFX 2.0 App,并在Windows上进行部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆