public class Information {
2 public static void main(String args[])
{
3 System.out.println("java_vendor:" + System.getProperty("java.vendor"));
4 System.out.println("java_vendor_url:"
5 + System.getProperty("java.vendor.url"));
6 System.out.println("java_home:" + System.getProperty("java.home"));
7 System.out.println("java_class_version:"
8 + System.getProperty("java.class.version"));
9 System.out.println("java_class_path:"
10 + System.getProperty("java.class.path"));
11 System.out.println("os_name:" + System.getProperty("os.name"));
12 System.out.println("os_arch:" + System.getProperty("os.arch"));
13 System.out.println("os_version:" + System.getProperty("os.version"));
14 System.out.println("user_name:" + System.getProperty("user.name"));
15 System.out.println("user_home:" + System.getProperty("user.home"));
16 System.out.println("user_dir:" + System.getProperty("user.dir"));
17 System.out.println("java_vm_specification_version:"
18 + System.getProperty("java.vm.specification.version"));
19 System.out.println("java_vm_specification_vendor:"
20 + System.getProperty("java.vm.specification.vendor"));
21 System.out.println("java_vm_specification_name:"
22 + System.getProperty("java.vm.specification.name"));
23 System.out.println("java_vm_version:"
24 + System.getProperty("java.vm.version"));
25 System.out.println("java_vm_vendor:"
26 + System.getProperty("java.vm.vendor"));
27 System.out
28 .println("java_vm_name:" + System.getProperty("java.vm.name"));
29 System.out.println("java_ext_dirs:"
30 + System.getProperty("java.ext.dirs"));
31 System.out.println("file_separator:"
32 + System.getProperty("file.separator"));
33 System.out.println("path_separator:"
34 + System.getProperty("path.separator"));
35 System.out.println("line_separator:"
36 + System.getProperty("line.separator"));
37 }
38}
java get properties
最新推荐文章于 2024-08-19 09:54:36 发布