fix hanging jdr.sh script

Calling System.exit() at the end of main() for jdr.sh execution
to address this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=906287

Also adding a little resource cleanup.