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

Horcrux7 :

Which effect hat the jlink command line parameter --strip-debug?

In the documentation at jlink you can read:

Strips debug information from the output image

But what does this meas? Which type of debug information will be removed? I can think of line numbers of stacktraces. Does it mean that?

Naman :

I believe its more in order to get rid of the debug symbols which shall include the line numbers (yes), local variable details and possibly the comments in the bytecode generated as well, for e.g. :

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

Haven't given it a try myself though, but you can Check if Java bytecode contains debug symbols and compare it with a runtime image created using --strip-debug via .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=107750&siteId=1