View Javadoc

1   // System.java, created Fri Jan 11 17:11:03 2002 by joewhaley
2   // Copyright (C) 2001-3 John Whaley <jwhaley@alum.mit.edu>
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.ClassLib.sun13_win32.java.lang;
5   
6   import joeq.Class.PrimordialClassLoader;
7   
8   /***
9    * System
10   *
11   * @author  John Whaley <jwhaley@alum.mit.edu>
12   * @version $Id: System.java 1456 2004-03-09 22:01:46Z jwhaley $
13   */
14  public class System {
15  
16      private static java.util.Properties initProperties(java.util.Properties props) {
17          // TODO: read these properties from environment.
18          props.setProperty("java.class.version", "47.0");
19          props.setProperty("java.home", "C://jdk1.3//jre");
20          props.setProperty("java.runtime.name", "Java(TM) 2 Runtime Environment, Standard Edition");
21          props.setProperty("java.runtime.version", "1.3.0");
22          props.setProperty("java.specification.name", "Java Platform API Specification");
23          props.setProperty("java.specification.vendor", "Sun Microsystems, Inc.");
24          props.setProperty("java.specification.version", "1.3");
25          props.setProperty("java.vendor", "joeq");
26          props.setProperty("java.vendor.url", "http://joeq.sourceforge.net");
27          props.setProperty("java.vendor.url.bug", "http://joeq.sourceforge.net");
28          props.setProperty("java.version", "1.3.0");
29          props.setProperty("java.vm.name", "joeq virtual machine");
30          props.setProperty("java.vm.specification.name", "Java Virtual Machine Specification");
31          props.setProperty("java.vm.specification.vendor", "Sun Microsystems, Inc.");
32          props.setProperty("java.vm.specification.version", "1.0");
33          props.setProperty("java.vm.vendor", "joeq");
34          props.setProperty("java.vm.version", "1.3.0");
35          
36          props.setProperty("os.arch", "x86");
37          props.setProperty("os.name", "Windows 2000");
38          props.setProperty("os.version", "5.0");
39          
40          props.setProperty("file.encoding", "Cp1252");
41          props.setProperty("file.encoding.pkg", "sun.io");
42          props.setProperty("file.separator", "//");
43          
44          props.setProperty("line.separator", "\r\n");
45          
46          props.setProperty("path.separator", ";");
47          
48          props.setProperty("user.dir", "C://joeq");
49          props.setProperty("user.home", "C://Documents and Settings//John Whaley");
50          props.setProperty("user.language", "en");
51          props.setProperty("user.name", "jwhaley");
52          props.setProperty("user.region", "US");
53          props.setProperty("user.timezone", "");
54  
55          // must be at end: classpathToString() uses some properties from above.
56          props.setProperty("java.class.path", PrimordialClassLoader.loader.classpathToString());
57  
58          return props;
59      }
60  
61  }