jlink命令行参数--strip-debug是什么意思?

What does the jlink command line parameter --strip-debug mean?

jlink 命令行参数 --strip-debug 的作用是什么?

jlink 的文档中,您可以阅读:

Strips debug information from the output image

但这意味着什么?将删除哪种类型的调试信息?我可以想到堆栈跟踪的行号。是这个意思吗?

我相信它更多的是为了摆脱 调试符号,其中应包括行号(是)、局部变量详细信息以及可能生成的字节码中的注释好吧,例如:

public com.some.pack.ReferenceVariableSample();
  Code:
    0: aload_0
    1: invokespecial #1                  // Method java/lang/Object."<init>":()V
    4: return

虽然我自己还没有尝试过,但你可以Check if Java bytecode contains debug symbols and compare it with a runtime image created using --strip-debug via