# Java Debug Wire Protocol

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Java_Debug_Wire_Protocol
> Markdown URL: https://mediated.wiki/source/Java_Debug_Wire_Protocol.md
> Source: https://en.wikipedia.org/wiki/Java_Debug_Wire_Protocol
> Source revision: 1301087915
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

In computing, the '''Java Debug Wire Protocol''' ('''JDWP''') is a [communication protocol](/source/communication_protocol) which is part of the [Java Platform Debugger Architecture](/source/Java_Platform_Debugger_Architecture).<ref>{{Cite book|title=Software visualization: international seminar, Dagstuhl Castle, Germany, May 20-25, 2001 : revised papers|date=2002|publisher=Springer|others=Stephan Diehl|isbn=978-3-540-45875-3|location=Berlin|pages=185|oclc=50589687}}</ref> It is used for communication between a [debugger](/source/debugger) and the [Java Virtual Machine](/source/Java_virtual_machine), which it [debug](/source/debug)s. It allows to debug processes on a different computer. It can work over a [network socket](/source/network_socket) or through [shared memory](/source/shared_memory).

The protocol is implemented in the [software library](/source/software_library) <code>libjdwp</code>.<ref>{{Cite book|last=Topley|first=Kim|title=J2ME in a nutshell: a desktop quick reference|date=2002|publisher=O'Reilly|isbn=9780596002534|edition=1st|location=Beijing|pages=235|oclc=52355507}}</ref> It can be activated using the <code>-Xrunjdwp</code> parameter of [Java](/source/Java_(language)).

[Metasploit](/source/Metasploit) includes a module for JDWP. It can exploit it using various scripts, which have functions such as [injecting](/source/Code_injection) a Java class that executes a [shell](/source/shell_(computing)) command, returns [operating system](/source/operating_system) details or injects an arbitrary class.

== References ==
{{Reflist}}

== External links ==
* [https://docs.oracle.com/javase/7/docs/technotes/guides/jpda/jdwp-spec.html Java Debug Wire Protocol - Java SE Documentation]
* [https://ioactive.com/hacking-java-debug-wire-protocol-or-how/ Hacking the Java Debug Wire Protocol] by [IOActive](/source/IOActive)
* [https://patents.google.com/patent/US20110138359A1/en Patent US20110138359A1 -  Modified implementation of java debug wire protocol]
* [https://blog.aquasec.com/jdwp-misconfiguration-container-images JDWP Misconfiguration in Container Images and K8s]

Category:Debugging
Category:Communications protocols
Category:Java (programming language)

{{Programming-software-stub}}

---
Adapted from the Wikipedia article [Java Debug Wire Protocol](https://en.wikipedia.org/wiki/Java_Debug_Wire_Protocol) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Java_Debug_Wire_Protocol?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
