Skip to content

Instantly share code, notes, and snippets.

@rombert
Last active December 7, 2015 17:50
Show Gist options
  • Save rombert/55a2ec6d5c0d6ac87dbd to your computer and use it in GitHub Desktop.
Save rombert/55a2ec6d5c0d6ac87dbd to your computer and use it in GitHub Desktop.
javad script, drop in ~/bin/ and never try to remember the Java debug flags again. Wherever you would use the java command, just use javad
#!/bin/sh
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=${SUSPEND:-n},address=${PORT:-30303} "$@"
@rombert
Copy link
Author

rombert commented Dec 7, 2015

Usage examples:

javad -jar my-file.jar
SUSPEND=y javad -cp ... com.example.Main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment