8041923: Command line output is missing from jinfo
authorsla
Sun, 25 May 2014 09:37:20 +0200
changeset 24569 9e8d972e5e3b
parent 24568 0a6c919b3b31
child 24570 73964a8ec72d
8041923: Command line output is missing from jinfo Reviewed-by: dcubed, allwin, jbachorik
jdk/src/share/classes/sun/tools/jinfo/JInfo.java
--- a/jdk/src/share/classes/sun/tools/jinfo/JInfo.java	Fri May 23 19:42:16 2014 +0100
+++ b/jdk/src/share/classes/sun/tools/jinfo/JInfo.java	Sun May 25 09:37:20 2014 +0200
@@ -158,6 +158,8 @@
                         sysprops(pid);
                         System.out.println();
                         flags(pid);
+                        System.out.println();
+                        commandLine(pid);
                     } else {
                         usage(1);
                     }
@@ -248,6 +250,12 @@
         drain(vm, in);
     }
 
+    private static void commandLine(String pid) throws IOException {
+        HotSpotVirtualMachine vm = (HotSpotVirtualMachine) attach(pid);
+        InputStream in = vm.executeJCmd("VM.command_line");
+        drain(vm, in);
+    }
+
     private static void sysprops(String pid) throws IOException {
         HotSpotVirtualMachine vm = (HotSpotVirtualMachine) attach(pid);
         InputStream in = vm.executeJCmd("VM.system_properties");