I would like to intentionally print Java core dumps on a Windows server.
If anyone knows how to output it, please let me know.
Environment
Java(TM)SE Development Kit 11.0.12(64-bit)
Windows Server 2019
"Regarding ""Java Core Dump,"" is it a Java thread dump?"
If so, first identify the process ID with jps.
C:\>"C:\Program Files\Java\jdk-11.0.12.7\bin\jps.exe"
17616 JShellToolProvider
17812 Jps
17816 RemoteExecutionControl
Then run jstack with that process ID.
C:\>"C:\Program Files\Java\jdk-11.0.12.7\bin\jstack.exe"17616
2022-09-05 23:20:43
Full thread dump OpenJDK64 - Bit Server VM (18.0.2 + 9 mixed mode, sharing):
Threads class SMR info:
_java_thread_list=0x000001b03aa6f0c0, length=20, elements={
0x000001b00f4869b0, 0x000001b00f54dc10, 0x000001b00f54ea70, 0x000001b0357a79a0,
0x000001b0357a8340, 0x000001b0357a8ce0, 0x000001b0357a9680, 0x000001b0357adad0,
0x000001b0357b8620, 0x000001b0357bb010, 0x000001b039c9c2d0, 0x000001b039d30460,
0x000001b039fea 160, 0x000001b039ff0650, 0x000001b03a348110, 0x000001b03a37a600,
0x000001b03a464af0, 0x000001b03b8ec410, 0x000001b03b503fa0, 0x000001b03b504470
}
"main" #1 prio=5os_prio=0 cpu=1703.12ms elapped=161.23stid=0x000001b00f4869b0nid=2568 in Object.wait() [0x000000631f7fe000]
java.lang.Thread.State: TIMED_WAITING(on object monitor)
at java.lang.Object.wait ([email protected]/Native Method)
- waiting on <no object reference available >
at jdk.internal.org.jline.utils.NonBlockingInputStreamImpl.read ([email protected]/NonBlockingInputStreamImpl.java:139)
- locked<0x00000006e02d91c0> (ajdk.internal.jshell.tool.ConsoleIOContext$1)
at jdk.internal.org.jline.utils.NonBlockingInputStream.read([email protected]/NonBlockingInputStream.java:62)
at jdk.internal.org.jline.utils.NonBlocking$NonBlockingInputStreamReader.read([email protected]/NonBlocking.java:168)
at jdk.internal.org.jline.utils.NonBlockingReader.read ([email protected]/NonBlockingReader.java:57)
at jdk.internal.org.jline.keymap.BindingReader.readCharacter([email protected]/BindingReader.java:160)
at jdk.internal.org.jline.keymap.BindingReader.readBinding([email protected]/BindingReader.java:110)
at jdk.internal.org.jline.keymap.BindingReader.readBinding([email protected]/BindingReader.java:61)
at jdk.internal.org.jline.reader.impl.LineReaderImpl.doReadBinding([email protected]/LineReaderImpl.java:923)
at jdk.internal.org.jline.reader.impl.LineReaderImpl.readBinding ([email protected]/LineReaderImpl.java:956)
at jdk.internal.jshell.tool.ConsoleIOContext$2.readBinding ([email protected]/ConsoleIOContext.java:173)
at jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine([email protected]/LineReaderImpl.java:651)
at jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine([email protected]/LineReaderImpl.java:468)
at jdk.internal.jshell.tool.ConsoleIOContext.readLine ([email protected]/ConsoleIOContext.java:249)
at jdk.internal.jshell.tool.JShellTool.getInput ([email protected]/JShellTool.java:1281)
at jdk.internal.jshell.tool.JShellTool.run([email protected]/JShellTool.java:1215)
at jdk.internal.jshell.tool.JShellTool.start ([email protected]/JShellTool.java:1001)
at jdk.internal.jshell.tool.JShellToolBuilder.start ([email protected]/JShellToolBuilder.java:261)
at jdk.internal.jshell.tool.JShellToolProvider.main([email protected]/JShellToolProvider.java:120)
(omitted)
© 2024 OneMinuteCode. All rights reserved.