History

Updated System class, removed some unsupported features, updated properties

Dmitry Kabak (userdima committed 13 years ago

Commit 11a39471 parent f6838533 files · +21 −2Browse files

Showing the changes to java (3 of 3 files). Show all

Unified · Split

3 files
  1. java/pkg/java/lang/System.java +9 −2
  2. java/pkg/java/lang/System_L.b +11 −0
  3. java/pkg/java/lang/System_L.m +1 −0
java/pkg/java/lang/System.java+9−2
@@ -1142,10 +1142,17 @@ public final class System { · 1141 unmodified lines
11421142 setErr0(new PrintStream(new BufferedOutputStream(fdErr, 128), true));
11431143 // Load the zip library now in order to keep java.util.zip.ZipFile
11441144 // from trying to use itself to load this library later.
1145− loadLibrary("zip");
1145+ // [Inferno] <
1146+ // Not really needed now. We have no libraries, no jars, and currently
1147+ // can run only converted dis code.
1148+ //loadLibrary("zip");
1149+ // [Inferno] >
11461150
11471151 // Setup Java signal handlers for HUP, TERM, and INT (where available).
1148− Terminator.setup();
1152+ // [Inferno] <
1153+ // No terminators in Inferno
1154+ //Terminator.setup();
1155+ // [Inferno] >
11491156
11501157 // Initialize any miscellenous operating system settings that need to be
11511158 // set for the class libraries. Currently this is no-op everywhere except
java/pkg/java/lang/System_L.b+11−0
@@ -50,6 +50,13 @@ init( jni_p : JNI ) · 49 unmodified lines
5050 #<<
5151 }
5252
53+mapLibraryName_rString_rString( p0 : JString) : JString
54+{#>>
55+ # TODO: what are libraries in Inferno?
56+ # dis files? native modules? .m?
57+ return p0;
58+}#<<
59+
5360 setIn0_rInputStream_V( p0 : JObject)
5461 {#>>
5562 Value : import JNI;
@@ -141,6 +148,9 @@ initProperties_rProperties_rProperties( p0 : JObject ) : JObject · 85 unmodified lines
141148 # Default properties
142149 # TODO: ask Inferno when possible instead of hardcoded values
143150 properties := array [] of {
151+ ("java.vm.version", "20.51-b01-457"), #FIXME: write real version here
152+ ("java.vm.name", "Inferno's JVM, Sux(?)"),
153+ ("java.vm.info", "mixed mode"),
144154 ("java.vendor", "Inferno project"),
145155 ("java.vendor.url", "http://www.vitanuova.com/inferno/"),
146156 ("java.home", "/java"),
@@ -149,6 +159,7 @@ initProperties_rProperties_rProperties( p0 : JObject ) : JObject · 2 unmodified lines
149159 ("os.name", "Inferno OS"),
150160 ("os.arch", "x86"),
151161 ("os.version", "4th edition"),
162+ ("file.encoding", "utf-8"),
152163 ("file.separator", "/"),
153164 ("path.separator", ":"),
154165 ("line.separator", "\n"),
java/pkg/java/lang/System_L.m+1−0
@@ -13,6 +13,7 @@ System_L : module · 12 unmodified lines
1313 setErr0_rPrintStream_V : fn( p0 : JObject);
1414 currentTimeMillis_J : fn( ) : big;
1515 arraycopy_rObject_I_rObject_I_I_V : fn( p0 : JObject,p1 : int,p2 : JObject,p3 : int,p4 : int);
16+ mapLibraryName_rString_rString : fn( p0 : JString) : JString;
1617 identityHashCode_rObject_I : fn( p0 : JObject) : int;
1718 initProperties_rProperties_rProperties : fn( p0 : JObject ) : JObject;
1819 GetUserName_rString : fn( ) : JString;