24 */ |
24 */ |
25 |
25 |
26 package sun.tools.jconsole; |
26 package sun.tools.jconsole; |
27 |
27 |
28 import java.io.PrintStream; |
28 import java.io.PrintStream; |
|
29 import sun.tools.jconsole.Messages; |
29 |
30 |
30 public class Version { |
31 public class Version { |
31 private static final String jconsole_version = |
32 private static final String jconsole_version = |
32 "@@jconsole_version@@"; |
33 "@@jconsole_version@@"; |
33 |
34 |
34 public static void print(PrintStream ps) { |
35 public static void print(PrintStream ps) { |
35 printFullVersion(ps); |
36 printFullVersion(ps); |
36 |
37 |
37 ps.println(Resources.getText("Name and Build", |
38 ps.println(Resources.format(Messages.NAME_AND_BUILD, |
38 System.getProperty("java.runtime.name"), |
39 System.getProperty("java.runtime.name"), |
39 System.getProperty("java.runtime.version"))); |
40 System.getProperty("java.runtime.version"))); |
40 |
41 |
41 ps.println(Resources.getText("Name Build and Mode", |
42 ps.println(Resources.format(Messages.NAME_AND_BUILD, |
42 System.getProperty("java.vm.name"), |
43 System.getProperty("java.vm.name"), |
43 System.getProperty("java.vm.version"), |
44 System.getProperty("java.vm.version"), |
44 System.getProperty("java.vm.info"))); |
45 System.getProperty("java.vm.info"))); |
45 |
46 |
46 } |
47 } |
47 |
48 |
48 public static void printFullVersion(PrintStream ps) { |
49 public static void printFullVersion(PrintStream ps) { |
49 ps.println(Resources.getText("JConsole version", jconsole_version)); |
50 ps.println(Resources.format(Messages.JCONSOLE_VERSION, jconsole_version)); |
50 } |
51 } |
51 |
52 |
52 static String getVersion() { |
53 static String getVersion() { |
53 return jconsole_version; |
54 return jconsole_version; |
54 } |
55 } |