简体   繁体   English

使用 deps 从旧 JAR 创建模块化 JAR

[英]Create a modular JAR from old JAR with deps

I have a modular JavaFX 11 app, that I need to be able to bundle for Linux and Windows.我有一个模块化的 JavaFX 11 应用程序,我需要能够为 Linux 和 Windows 捆绑。 I'm currently using jlink to do so and it works well.我目前正在使用 jlink 这样做,它运行良好。 I need the bundle to be standalone, as the Java version on the target computers is 1.8 .我需要这个包是独立的,因为目标计算机上的 Java 版本是 1.8 。

Now I must add the SMBJ library to my app.现在我必须将 SMBJ 库添加到我的应用程序中。 I grabbed the good old jar, and need to modularize it (otherwise I can't use jlink, as seen here ).我抓住了良好的旧罐子,需要模块化它(否则我无法使用JLINK,因为看到这里)。

Do I need to also modularize the bazillion deps SMBJ has, or is there another way?我是否还需要模块化 SMBJ 拥有的大量 deps,还是有其他方法?

It is not true that jlink cannot be used to bundle non-modular applications. jlink 不能用于捆绑非模块化应用程序是不正确的。 Have a look at this tutorial which shows you how to do it.看看这个教程,它向你展示了如何做到这一点。 https://github.com/dlemmermann/JPackageScriptFX It uses a combination of jlink and jpackage to achieve the desired result. https://github.com/dlemmermann/JPackageScriptFX它使用 jlink 和 jpackage 的组合来达到预期的效果。

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

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