简体   繁体   English

JPackage 仅在 Java 14 上返回 SDK 版本号

[英]JPackage only returns SDK Version Number on Java 14

I recently ported our Java 11 application to the newly released Java 14 (ZuluJDK).我最近将我们的 Java 11 应用程序移植到新发布的 Java 14 (ZuluJDK)。 When trying to package our Application with the new JPackage via command line, the only thing that happens, no matter which jpackage-command I'm using, is the following Output:当尝试通过命令行使用新的 JPackage 打包我们的应用程序时,无论我使用哪个 jpackage-command,唯一发生的事情是以下输出:

WARNING: Using incubator modules: jdk.incubator.jpackage
14

An example command (censored some stuff, represented by < > placeholders...):一个示例命令(审查了一些内容,由 < > 占位符...表示):

jpackage --type app-image --verbose --input <path> --main-class <class> --main-jar ./<name>.jar --output runtime-image --name "<name>" --version 2.0.0 --vendor "<company>" --icon <icon-path>.ico

Can somebody help me what could cause this?有人可以帮助我是什么原因造成的吗? The Output of the sdk version does not provide much help. sdk 版本的输出没有提供太多帮助。

After stripping down argument after argument, I found out that providing the arguments "--version 2.0.0" was causing the issue.在逐个剥离参数后,我发现提供参数“--version 2.0.0”是导致问题的原因。

Running跑步

jpackage --help

provided the following information about version, which is described and behaves differently than I expected:提供了有关版本的以下信息,该信息的描述和行为与我预期的不同:

--version
      Print the product version to the output stream and exit

So it echoed the JDK Version (14) and, as described, exited.因此,它与 JDK 版本 (14) 相呼应,并且如上所述,退出了。 I obviously was looking for --app-version.我显然正在寻找--app-version。

Now I get the error that something is wrong with my --output argument, but that is another issue I can hopefully fix on my side.现在我收到错误消息,我的 --output 参数有问题,但这是另一个我希望可以解决的问题。 BTW: there is a lot of Logging output once you get it running with the bare minimum arguments required.顺便说一句:一旦您使用所需的最少参数运行它,就会有很多日志输出。

Thank you all for your help!谢谢大家的帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM