Jkillthread
Simple tool to attach to a Java VM and kill an individual thread.
Install / Use
/learn @jglick/JkillthreadREADME
Command-line tool to kill a single thread in a Java VM, using the Oracle JDK 6+ Attach API.
Download jkillthread-1.0.jar and run using the java command from a JDK to get usage instructions.
Essentially you pass a process ID (or unique name substring) and then a thread name (or substring):
java -jar jkillthread-1.0.jar 12345 "rogue HTTP handler"
(jps -lm is useful for finding a process ID. jstack 12345 can be used to see currently running threads.)
Beware that killing a thread in Java (Thread.stop) can have various effects, depending on what it was doing:
- It might die quietly and that is that.
- It might die, but print or log a stack trace somewhere first.
- It might die but a similar thread be automatically relaunched by some sentinel.
- It might not die because it is blocked in some native call which does not honor
stop. - It might go into an odd state and not release locks that it should have. (Theoretically. I have never actually seen this happen.)
Caveat interfector!
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
