System class contains several useful class fields and methods.
More...
#include <java_lang_System.h>
Inheritance diagram for java::lang::System:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::System > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::System > > | array2D |
Static Public Member Functions | |
| static void | arraycopy (const ::java::lang::Object &src, jint srcPos, const ::java::lang::Object &dest, jint destPos, jint length,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. | |
| static jlong | currentTimeMillis (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the current time in milliseconds. | |
| static void | exit (jint status,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Terminates the currently running Java Virtual Machine. | |
| static void | gc (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Runs the garbage collector. | |
| ::java::lang::String | getenv (const ::java::lang::String &name,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Gets an environment variable. | |
| ::java::util::Properties | getProperties (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines the current system properties. | |
| ::java::lang::String | getProperty (const ::java::lang::String &key, const ::java::lang::String &def,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Gets the system property indicated by the specified key. | |
| ::java::lang::String | getProperty (const ::java::lang::String &key,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Gets the system property indicated by the specified key. | |
| ::java::lang::SecurityManager | getSecurityManager (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Gets the system security interface. | |
| static jint | identityHashCode (const ::java::lang::Object &x,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). | |
| static void | load (const ::java::lang::String &filename,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Loads a code file with the specified filename from the local file system as a dynamic library. | |
| static void | loadLibrary (const ::java::lang::String &libname,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Loads the system library specified by the libname argument. | |
| ::java::lang::String | mapLibraryName (const ::java::lang::String &libname,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Maps a library name into a platform-specific string representing a native library. | |
| static void | runFinalization (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Runs the finalization methods of any objects pending finalization. | |
| static void | runFinalizersOnExit (bool value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits. | |
| static void | setErr (const ::java::io::PrintStream &err,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Reassigns the "standard" error output stream. | |
| static void | setIn (const ::java::io::InputStream &in,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Reassigns the "standard" input stream. | |
| static void | setOut (const ::java::io::PrintStream &out,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Reassigns the "standard" output stream. | |
| static void | setProperties (const ::java::util::Properties &props,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Sets the system properties to the Properties argument. | |
| ::java::lang::String | setProperty (const ::java::lang::String &key, const ::java::lang::String &value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets the system property indicated by the specified key. | |
| static void | setSecurityManager (const ::java::lang::SecurityManager &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Sets the System security. | |
Static Public Attributes | |
| ::java::io::PrintStream | err |
| The "standard" error output stream. | |
| ::java::io::InputStream | in |
| The "standard" input stream. | |
| ::java::io::PrintStream | out |
| The "standard" output stream. | |
System class contains several useful class fields and methods.
It cannot be instantiated.
Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined "properties"; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.
|
||||||||||||||||||||||||||||||||
|
Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.
A subsequence of array components are copied from the source array referenced by
If the
If
If
Otherwise, if any of the following is true, an
Otherwise, if any of the following is true, an
Otherwise, if any actual component of the source array from position
|
|
||||||||||||
|
Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.
See the description of the class
|
|
||||||||||||||||
|
Terminates the currently running Java Virtual Machine. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
This method calls the
The call
Runtime.getRuntime().exit(n) </blockquote>
|
|
||||||||||||
|
Runs the garbage collector.
Calling the
The call
Runtime.getRuntime().gc() </blockquote>
|
|
||||||||||||||||
|
Gets an environment variable. An environment variable is a system-dependent external variable that has a string value.
|
|
||||||||||||
|
||||||||||||||||||||
|
Gets the system property indicated by the specified key.
First, if there is a security manager, its
If there is no current set of system properties, a set of system properties is first created and initialized in the same manner as for the
|
|
||||||||||||||||
|
Gets the system property indicated by the specified key.
First, if there is a security manager, its
If there is no current set of system properties, a set of system properties is first created and initialized in the same manner as for the
|
|
||||||||||||
|
Gets the system security interface.
|
|
||||||||||||||||
|
Returns the same hash code for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). The hash code for the null reference is zero.
|
|
||||||||||||||||
|
Loads a code file with the specified filename from the local file system as a dynamic library. The filename argument must be a complete path name.
The call
Runtime.getRuntime().load(name) </blockquote>
|
|
||||||||||||||||
|
Loads the system library specified by the The manner in which a library name is mapped to the actual system library is system dependent.
The call
Runtime.getRuntime().loadLibrary(name) </blockquote>
|
|
||||||||||||||||
|
Maps a library name into a platform-specific string representing a native library.
|
|
||||||||||||
|
Runs the finalization methods of any objects pending finalization.
Calling this method suggests that the Java Virtual Machine expend effort toward running the
The call
Runtime.getRuntime().runFinalization() </blockquote>
|
|
||||||||||||||||
|
Enable or disable finalization on exit; doing so specifies that the finalizers of all objects that have finalizers that have not yet been automatically invoked are to be run before the Java runtime exits. By default, finalization on exit is disabled.
If there is a security manager, its
|
|
||||||||||||||||
|
Reassigns the "standard" error output stream.
First, if there is a security manager, its
|
|
||||||||||||||||
|
Reassigns the "standard" input stream.
First, if there is a security manager, its
|
|
||||||||||||||||
|
Reassigns the "standard" output stream.
First, if there is a security manager, its
|
|
||||||||||||||||
|
Sets the system properties to the
First, if there is a security manager, its
The argument becomes the current set of system properties for use by the method. If the argument is
|
|
||||||||||||||||||||
|
Sets the system property indicated by the specified key.
First, if a security manager exists, its
|
|
||||||||||||||||
|
Sets the System security.
If there is a security manager already installed, this method first calls the security manager's
Otherwise, the argument is established as the current security manager. If the argument is
|
|
|
The "standard" error output stream. This stream is already open and ready to accept output data.
Typically this stream corresponds to display output or another output destination specified by the host environment or user. By convention, this output stream is used to display error messages or other information that should come to the immediate attention of a user even if the principal output stream, the value of the variable |
|
|
The "standard" input stream. This stream is already open and ready to supply input data. Typically this stream corresponds to keyboard input or another input source specified by the host environment or user. |
|
|
The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user. For simple stand-alone Java applications, a typical way to write a line of output data is: <blockquote>
System.out.println(data) </blockquote>
See the |
1.4.1