The remote debugging port of Java uses the JDWP protocol, and NSE has a few scripts to detect and exploit vulnerable servers. Let's briefly review the available Java classes you will find distributed with Nmap inside your data directory.
This is the Java class used to run remote commands. It uses the
Runtime.getRuntime().exec function to execute the desired commands.
This Java function attempts to retrieve the following system information: