gpt4 book ai didi

javafx-8 - Javafxpackager : how do you set the "base JDK"?

转载 作者:行者123 更新时间:2023-12-03 21:22:31 26 4
gpt4 key购买 nike

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

No base JDK. Package will use system JRE.

Deploying JavaFX Applications 的文档中不清楚如何指定替代的 JDK。没有它的选项,我可以看到(也许我是瞎的)。它是系统属性吗?

谢谢。

最佳答案

有一个old Oracle blog其中提到了这一点。不知道它是否仍然适用或与您的案例相关:

Self-Contained Applications: Select Java Runtime to bundle

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.

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

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"/>

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.

关于javafx-8 - Javafxpackager : how do you set the "base JDK"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24025309/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com