1 /*
2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of Oracle nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34 * or technique and has been deliberately simplified. Additional steps
35 * required for a production-quality application, such as security checks,
36 * input validation and proper error handling, might not be present in
37 * this sample code.
38 */
39
40
41 package j2dbench;
42
43 import java.util.Hashtable;
44 import java.util.Properties;
45 import java.util.Enumeration;
46 import java.util.Vector;
47 import java.io.PrintWriter;
48
49 public class ResultSet {
50 static Hashtable preferprops;
51 static Hashtable ignoreprops;
52
53 // Preferred props - will be listed even if undefined
54 static String preferredkeys[] = {
55 "java.version",
56 "java.runtime.version",
57 "java.class.version",
58 "java.vm.version",
59 "java.vm.name",
60 "java.vm.info",
61 "java.home",
62 "java.compiler",
63 "os.arch",
64 "os.name",
65 "os.version",
66 "user.name",
67 "sun.cpu.endian",
68 "sun.cpu.isalist",
69 };
70
71 // Ignored props - will not be copied to results file
72 static String ignoredkeys[] = {
73 "user.dir",
74 "user.home",
75 "user.timezone",
76 "path.separator",
77 "line.separator",
78 "file.separator",
79 "file.encoding",
80 "java.class.path",
81 "java.library.path",
82 "java.io.tmpdir",
83 "java.util.prefs.PreferencesFactory",
84 "sun.java2d.fontpath",
85 "sun.boot.library.path",
86 };
87
88 /*
89 * Other props, as of 1.4.0, not classified as "preferred" or "ignored"
90 * Allowed to propagate to the results file if defined.
91 *
92 * java.runtime.name
|
1 /*
2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * - Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * - Neither the name of Oracle nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34 * or technique and has been deliberately simplified. Additional steps
35 * required for a production-quality application, such as security checks,
36 * input validation and proper error handling, might not be present in
37 * this sample code.
38 */
39
40
41 package j2dbench;
42
43 import java.util.Hashtable;
44 import java.util.Properties;
45 import java.util.Enumeration;
46 import java.util.Vector;
47 import java.io.PrintWriter;
48
49 public class ResultSet {
50 static Hashtable preferprops;
51 static Hashtable ignoreprops;
52
53 // Preferred props - will be listed even if undefined
54 static String[] preferredkeys = {
55 "java.version",
56 "java.runtime.version",
57 "java.class.version",
58 "java.vm.version",
59 "java.vm.name",
60 "java.vm.info",
61 "java.home",
62 "java.compiler",
63 "os.arch",
64 "os.name",
65 "os.version",
66 "user.name",
67 "sun.cpu.endian",
68 "sun.cpu.isalist",
69 };
70
71 // Ignored props - will not be copied to results file
72 static String[] ignoredkeys = {
73 "user.dir",
74 "user.home",
75 "user.timezone",
76 "path.separator",
77 "line.separator",
78 "file.separator",
79 "file.encoding",
80 "java.class.path",
81 "java.library.path",
82 "java.io.tmpdir",
83 "java.util.prefs.PreferencesFactory",
84 "sun.java2d.fontpath",
85 "sun.boot.library.path",
86 };
87
88 /*
89 * Other props, as of 1.4.0, not classified as "preferred" or "ignored"
90 * Allowed to propagate to the results file if defined.
91 *
92 * java.runtime.name
|