Javafxpackager:如何设置“基本JDK"? [英] Javafxpackager: how do you set the "base JDK"?

查看:122
本文介绍了Javafxpackager:如何设置“基本JDK"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行javafxpackager时,得到以下警告/信息:

When I run javafxpackager, I get the following warning/info:

No base JDK. Package will use system JRE.

部署JavaFX应用程序的文档中尚不清楚替代JDK.我看不到它的选项(也许我是盲人).是系统属性吗?

It's not clear from the docs for Deploying JavaFX Applications how one would specify an alternative JDK. There isn't an option for it, that I can see (maybe I'm blind). Is it a system property?

谢谢.

推荐答案

有一个旧的Oracle博客,提到这一点.不过,不知道它是否仍然适用或与您的案件相关:

There is an old Oracle blog which mentions this. Don't know if it is still applicable or relevant to your case or not though:

自包含应用程序:选择要捆绑的Java运行时

7u6中的Packager工具采用当前的JDK(基于java.home属性) 是嵌入式运行时的源.这对于简化 在许多情况下,但在某些情况下可以指定要处理的内容 显式嵌入非常方便.例如,IDE可能使用固定的JDK来 构建项目,这不是您想要捆绑到的版本 您的应用程序.

Packager tools in 7u6 assume current JDK (based on java.home property) is the source for embedded runtime. This is useful simplification for many scenarios but there are cases where ability to specify what to embed explicitly is handy. For example IDE may be using fixed JDK to build the project and this is not the version you want to bundle into your application.

为了使其更加灵活,我们现在允许指定基本JDK的位置 明确地.它是可选的,如果您不指定它,那么当前 将使用JDK(即此更改完全向后兼容).

To make it more flexible we now allow to specify location of base JDK explicitly. It is optional and if you do not specify it then current JDK will be used (i.e. this change is fully backward compatible).

新的'basedir'属性已添加到标记中.它的值是 要使用的JDK的位置.可以指向其中的任何一个JRE JDK或JDK顶级文件夹.但是,它必须是JDK而不是JRE,因为我们 需要其他JDK工具进行正确包装,并且它必须是最新的 与JavaFX捆绑在一起的JDK版本(即Java 7 Update 6或 稍后).

New 'basedir' attribute was added to tag. Its value is location of JDK to be used. It is ok to point to either JRE inside the JDK or JDK top level folder. However, it must be JDK and not JRE as we need other JDK tools for proper packaging and it must be recent version of JDK that is bundled with JavaFX (i.e. Java 7 update 6 or later).

以下是示例(属于任务):

Here are examples ( is part of task):

<fx:platform basedir="${java.home}"/>      
<fx:platform basedir="c:\tools\jdk7"/> 

提示:此功能使您可以使用JDK 7中的打包工具 更新10(并受益于错误修复和描述的其他功能 下面的代码),以使用捆绑的FCS版本的JRE 7创​​建应用程序包 更新6.

Hint: this feature enables you to use packaging tools from JDK 7 update 10 (and benefit from bug fixes and other features described below) to create application package with bundled FCS version of JRE 7 update 6.

这篇关于Javafxpackager:如何设置“基本JDK"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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