📄 system.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:35:13 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class System</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/System.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/lang/StringBuffer.html"><B>PREV CLASS</B></A> <A HREF="../../java/lang/Thread.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="System.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.lang</FONT><BR>Class System</H2><PRE><A HREF="../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.lang.System</B></PRE><HR><DL><DT>public final class <B>System</B><DT>extends <A HREF="../../java/lang/Object.html">Object</A></DL><P>The <code>System</code> class contains several useful class fields and methods. It cannot be instantiated. <p> Among the facilities provided by the <code>System</code> 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.<P><DL><DT><B>Since: </B><DD>JDK1.0</DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/io/PrintStream.html">PrintStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#err">err</A></B></CODE><BR> The "standard" error output stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/io/InputStream.html">InputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#in">in</A></B></CODE><BR> The "standard" input stream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/io/PrintStream.html">PrintStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#out">out</A></B></CODE><BR> The "standard" output stream.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#arraycopy(java.lang.Object, int, java.lang.Object, int, int)">arraycopy</A></B>(<A HREF="../../java/lang/Object.html">Object</A> src, int src_position, <A HREF="../../java/lang/Object.html">Object</A> dst, int dst_position, int length)</CODE><BR> Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#currentTimeMillis()">currentTimeMillis</A></B>()</CODE><BR> Returns the current time in milliseconds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#exit(int)">exit</A></B>(int status)</CODE><BR> Terminates the currently running Java Virtual Machine.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#gc()">gc</A></B>()</CODE><BR> Runs the garbage collector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#getenv(java.lang.String)">getenv</A></B>(<A HREF="../../java/lang/String.html">String</A> name)</CODE><BR> <B>Deprecated.</B> <I>The preferred way to extract system-dependent information is the system properties of the <code>java.lang.System.getProperty</code> methods and the corresponding <code>get</code><em>TypeName</em> methods of the <code>Boolean</code>, <code>Integer</code>, and <code>Long</code> primitive types. For example: <blockquote><pre> String classPath = System.getProperty("java.class.path","."); <br> if (Boolean.getBoolean("myapp.exper.mode")) enableExpertCommands(); </pre></blockquote></I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/util/Properties.html">Properties</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#getProperties()">getProperties</A></B>()</CODE><BR> Determines the current system properties.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#getProperty(java.lang.String)">getProperty</A></B>(<A HREF="../../java/lang/String.html">String</A> key)</CODE><BR> Gets the system property indicated by the specified key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#getProperty(java.lang.String, java.lang.String)">getProperty</A></B>(<A HREF="../../java/lang/String.html">String</A> key, <A HREF="../../java/lang/String.html">String</A> def)</CODE><BR> Gets the system property indicated by the specified key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/SecurityManager.html">SecurityManager</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#getSecurityManager()">getSecurityManager</A></B>()</CODE><BR> Gets the system security interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#identityHashCode(java.lang.Object)">identityHashCode</A></B>(<A HREF="../../java/lang/Object.html">Object</A> x)</CODE><BR> Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode().</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#load(java.lang.String)">load</A></B>(<A HREF="../../java/lang/String.html">String</A> filename)</CODE><BR> Loads a code file with the specified filename from the local file system as a dynamic library.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#loadLibrary(java.lang.String)">loadLibrary</A></B>(<A HREF="../../java/lang/String.html">String</A> libname)</CODE><BR> Loads the system library specified by the <code>libname</code> argument.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#mapLibraryName(java.lang.String)">mapLibraryName</A></B>(<A HREF="../../java/lang/String.html">String</A> libname)</CODE><BR> Maps a library name into a platform-specific string representing a native library.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#runFinalization()">runFinalization</A></B>()</CODE><BR> Runs the finalization methods of any objects pending finalization.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -