All System API is static.
Static Public Member Functions | |
static void | setIn (InputStream newIn) |
Sets the value of the static slot "in" in the receiver to the passed in argument. | |
static void | setOut (java.io.PrintStream newOut) |
Sets the value of the static slot "out" in the receiver to the passed in argument. | |
static void | setErr (java.io.PrintStream newErr) |
Sets the value of the static slot "err" in the receiver to the passed in argument. | |
static void | arraycopy (Object array1, int start1, Object array2, int start2, int length) |
Copies the contents of array1 starting at offset start1 into array2 starting at offset start2 for length elements. | |
static native long | currentTimeMillis () |
Answers the current time expressed as milliseconds since the time 00:00:00 UTC on January 1, 1970. | |
static void | exit (int code) |
Causes the virtual machine to stop running, and the program to exit. | |
static void | gc () |
Indicate to the virtual machine that it would be a good time to collect available memory. | |
static String | getenv (String var) |
Returns an environment variable. | |
static Properties | getProperties () |
Answers the system properties. | |
static String | getProperty (String prop) |
Answers the value of a particular system property. | |
static String | getProperty (String prop, String defaultValue) |
Answers the value of a particular system property. | |
static String | setProperty (String prop, String value) |
Sets the value of a particular system property. | |
static SecurityManager | getSecurityManager () |
Answers the active security manager. | |
static native int | identityHashCode (Object anObject) |
Answers an integer hash code for the parameter. | |
static void | load (String pathName) |
Loads the specified file as a dynamic library. | |
static void | loadLibrary (String libName) |
Loads and links the library specified by the argument. | |
static void | runFinalization () |
Provides a hint to the virtual machine that it would be useful to attempt to perform any outstanding object finalizations. | |
static void | runFinalizersOnExit (boolean flag) |
Ensure that, when the virtual machine is about to exit, all objects are finalized. | |
static void | setProperties (Properties p) |
Answers the system properties. | |
static void | setSecurityManager (final SecurityManager s) |
Sets the active security manager. | |
static native String | mapLibraryName (String userLibName) |
Answers the platform specific file name format for the shared library named by the argument. | |
Static Public Attributes | |
static final InputStream | in |
Default input stream. | |
static final PrintStream | out |
Default output stream. | |
static final PrintStream | err |
Default error output stream. | |
Static Package Functions | |
[static initializer] | |
static Properties | internalGetProperties () |
Answers the system properties without any security checks. | |
Private Member Functions | |
System () | |
Prevents this class from being instantiated. | |
Static Private Member Functions | |
static void | arraycopy (Object[] A1, int offset1, Object[] A2, int offset2, int length) |
Private version of the arraycopy method (used by the jit for reference arraycopies). | |
static void | arraycopy (int[] A1, int offset1, int[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (byte[] A1, int offset1, byte[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (short[] A1, int offset1, short[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (long[] A1, int offset1, long[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (char[] A1, int offset1, char[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (boolean[] A1, int offset1, boolean[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (double[] A1, int offset1, double[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | arraycopy (float[] A1, int offset1, float[] A2, int offset2, int length) |
Copies the contents of A1 starting at offset offset1 into A2 starting at offset offset2 for length elements. | |
static void | ensureProperties () |
If systemProperties is unset, then create a new one based on the values provided by the virtual machine. | |
static native String[] | getPropertyList () |
Answers an array of Strings containing key. | |
static native String | getEncoding (int type) |
Return the requested encoding. | |
static native void | setFieldImpl (String fieldName, Object stream) |
Sets the value of the named static field in the receiver to the passed in argument. | |
Static Private Attributes | |
static final Runtime | RUNTIME = Runtime.getRuntime() |
static Properties | systemProperties |
static SecurityManager | security |
static final int | InitLocale = 0 |
static final int | PlatformEncoding = 1 |
static final int | FileEncoding = 2 |
static final int | OSEncoding = 3 |
|
Prevents this class from being instantiated.
|
|
Sets the value of the static slot "in" in the receiver to the passed in argument.
|
|
Sets the value of the static slot "out" in the receiver to the passed in argument.
|
|
Sets the value of the static slot "err" in the receiver to the passed in argument.
|
|
Copies the contents of
|
|
Private version of the arraycopy method (used by the jit for reference arraycopies).
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Copies the contents of
|
|
Answers the current time expressed as milliseconds since the time 00:00:00 UTC on January 1, 1970.
|
|
If systemProperties is unset, then create a new one based on the values provided by the virtual machine.
|
|
Causes the virtual machine to stop running, and the program to exit. If runFinalizersOnExit(true) has been invoked, then all finalizers will be run first.
|
|
Indicate to the virtual machine that it would be a good time to collect available memory. Note that, this is a hint only. |
|
Returns an environment variable.
|
|
Answers the system properties. Note that this is not a copy, so that changes made to the returned Properties object will be reflected in subsequent calls to getProperty and getProperties. Security managers should restrict access to this API if possible.
|
|
Answers the system properties without any security checks. This is used for access from within java.lang.
|
|
Answers the value of a particular system property. Answers null if no such property exists, The properties currently provided by the virtual machine are:
java.vendor.url java.class.path user.home java.class.version os.version java.vendor user.dir user.timezone path.separator os.name os.arch line.separator file.separator user.name java.version java.home
|
|
Answers the value of a particular system property. If no such property is found, answers the defaultValue.
|
|
Sets the value of a particular system property.
|
|
Answers an array of Strings containing key. .value pairs (in consecutive array elements) which represent the starting values for the system properties as provided by the virtual machine.
|
|
Return the requested encoding. 0 - initialize locale 1 - detected platform encoding 2 - command line defined file.encoding 3 - command line defined os.encoding |
|
Answers the active security manager.
|
|
Answers an integer hash code for the parameter. The hash code returned is the same one that would be returned by java.lang.Object.hashCode(), whether or not the object's class has overridden hashCode(). The hash code for null is 0.
|
|
Loads the specified file as a dynamic library.
|
|
Loads and links the library specified by the argument.
|
|
Provides a hint to the virtual machine that it would be useful to attempt to perform any outstanding object finalizations.
|
|
Ensure that, when the virtual machine is about to exit, all objects are finalized. Note that all finalization which occurs when the system is exiting is performed after all running threads have been terminated.
|
|
Answers the system properties. Note that the object which is passed in not copied, so that subsequent changes made to the object will be reflected in calls to getProperty and getProperties. Security managers should restrict access to this API if possible.
|
|
Sets the active security manager. Note that once the security manager has been set, it can not be changed. Attempts to do so will cause a security exception.
|
|
Answers the platform specific file name format for the shared library named by the argument.
|
|
Sets the value of the named static field in the receiver to the passed in argument.
|
|
Default input stream.
|
|
Default output stream.
|
|
Default error output stream.
|