Please review this fix. It applies the same correction to jstack and jinfo which was already applied to jcmd. To avoid code duplication, I moved the actual code to a utility class.
webrev: http://cr.openjdk.java.net/~rschmelter/webrevs/8227868/webrev.0/ bugreport: https://bugs.openjdk.java.net/browse/JDK-8227868 Best regards, Ralf