changeset 10001:bff46681a3f8

8041923: Command line output is missing from jinfo Reviewed-by: dcubed, allwin, jbachorik
author sla
date Sun, 25 May 2014 09:37:20 +0200
parents e48e3e902f4c
children 461d8801b05a
files src/share/classes/sun/tools/jinfo/JInfo.java
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/tools/jinfo/JInfo.java	Fri May 23 19:42:16 2014 +0100
+++ b/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");