我没有发现--strip-native-commands使用jlink --help(甚至没有将其列为选项),甚至在docs中也没有.我没有在网上找到任何关于它的文档,但使用jpackage -h告诉我:

--jlink-options <jlink options>
          A space separated list of options to pass to jlink
          If not specified, defaults to "--strip-native-commands
          --strip-debug --no-man-pages --no-header-files".
          This option can be used multiple times.
          ...
          ...
          If --runtime-image is not specified, jpackage will run jlink to
          create the runtime image using options:
          --strip-debug, --no-header-files, --no-man-pages, and
          --strip-native-commands.

在线上似乎没有关于--strip-native-commands的任何东西.使用它似乎可以稍微缩短运行时:

34612   ncnotstripped
34568   ncstripped

但我想知道任何潜在的权衡."原生命令"指的是什么?我从运行时中删除了什么以使其更小?

推荐答案

jlink的一些选项和文档"隐藏"在--list-plugins后面.如果您执行以下命令:

jlink --list-plugins

您将看到:

 --strip-native-commands   Exclude native commands (such as java/java.exe)
                           from the image.

至少在Windows上的21.0.1版中.

Java相关问答推荐

ActivityCompat.请求收件箱自动拒绝权限

Saxon 9:如何从Java扩展函数中的net.sf.saxon.expr. XPathContent中获取声明的变量

Cosmos Change Feed Process Lag远远超过收集中的记录数量

在Spring终结点中,是否可以同时以大写和小写形式指定枚举常量?

解释左移在Java中的工作原理

Java-动态绑定-问题-了解

Jolt变换JSON数组问题

SpringBoot Kafka自动配置-适用于SASL_PLAYTEXT的SSLBundle 包,带SCRAM-SHA-512

迁移到Java 17后,日期显示不准确

如何仅使用键/ID的一部分(组合)高效地返回映射值?

Spring安全令牌刷新和JWT签名与本地计算的签名不匹配

在macOS上读取文件会导致FileNotFound,即使文件存在(并且具有权限)

为什么这种递归会有这样的行为?

无法在IntStream上应用Collectors.groupingBy

如何在Struts2中使用操作类中的结果注释重定向到不同的命名空间

无法在Java中获取ElastiCache的AWS CloudWatch指标

rest api服务 spring 启动中出现IllegalFormatConversionException

如何使用stream.allMatch()为空流返回false?

读取ConcurrentHashMap中的可变对象

ANTLR 接受特殊字符,例如 .标识符或表达式中的(点)和 ,(逗号)