📄 system.html
字号:
<CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#runFinalizersOnExit(boolean)">runFinalizersOnExit</A></B>(boolean value)</CODE><BR> <B>Deprecated.</B> <I>This method is inherently unsafe. It may result in finalizers being called on live objects while other threads are concurrently manipulating those objects, resulting in erratic behavior or deadlock.</I></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#setErr(java.io.PrintStream)">setErr</A></B>(<A HREF="../../java/io/PrintStream.html">PrintStream</A> err)</CODE><BR> Reassigns the "standard" error output stream.</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#setIn(java.io.InputStream)">setIn</A></B>(<A HREF="../../java/io/InputStream.html">InputStream</A> in)</CODE><BR> Reassigns the "standard" input stream.</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#setOut(java.io.PrintStream)">setOut</A></B>(<A HREF="../../java/io/PrintStream.html">PrintStream</A> out)</CODE><BR> Reassigns the "standard" output stream.</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#setProperties(java.util.Properties)">setProperties</A></B>(<A HREF="../../java/util/Properties.html">Properties</A> props)</CODE><BR> Sets the system properties to the <code>Properties</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#setProperty(java.lang.String, java.lang.String)">setProperty</A></B>(<A HREF="../../java/lang/String.html">String</A> key, <A HREF="../../java/lang/String.html">String</A> value)</CODE><BR> Sets 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 void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/lang/System.html#setSecurityManager(java.lang.SecurityManager)">setSecurityManager</A></B>(<A HREF="../../java/lang/SecurityManager.html">SecurityManager</A> s)</CODE><BR> Sets the System security.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="in"><!-- --></A><H3>in</H3><PRE>public static final <A HREF="../../java/io/InputStream.html">InputStream</A> <B>in</B></PRE><DL><DD>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.</DL><HR><A NAME="out"><!-- --></A><H3>out</H3><PRE>public static final <A HREF="../../java/io/PrintStream.html">PrintStream</A> <B>out</B></PRE><DL><DD>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. <p> For simple stand-alone Java applications, a typical way to write a line of output data is: <blockquote><pre> System.out.println(data) </pre></blockquote> <p> See the <code>println</code> methods in class <code>PrintStream</code>.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/io/PrintStream.html#println()"><CODE>PrintStream.println()</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(boolean)"><CODE>PrintStream.println(boolean)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(char)"><CODE>PrintStream.println(char)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(char[])"><CODE>PrintStream.println(char[])</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(double)"><CODE>PrintStream.println(double)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(float)"><CODE>PrintStream.println(float)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(int)"><CODE>PrintStream.println(int)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(long)"><CODE>PrintStream.println(long)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(java.lang.Object)"><CODE>PrintStream.println(java.lang.Object)</CODE></A>, <A HREF="../../java/io/PrintStream.html#println(java.lang.String)"><CODE>PrintStream.println(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="err"><!-- --></A><H3>err</H3><PRE>public static final <A HREF="../../java/io/PrintStream.html">PrintStream</A> <B>err</B></PRE><DL><DD>The "standard" error output stream. This stream is already open and ready to accept output data. <p> 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 <code>out</code>, has been redirected to a file or other destination that is typically not continuously monitored.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setIn(java.io.InputStream)"><!-- --></A><H3>setIn</H3><PRE>public static void <B>setIn</B>(<A HREF="../../java/io/InputStream.html">InputStream</A> in)</PRE><DL><DD>Reassigns the "standard" input stream. <p>First, if there is a security manager, its <code>checkPermission</code> method is called with a <code>RuntimePermission("setIO")</code> permission to see if it's ok to reassign the "standard" input stream. <p><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the new standard input stream.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code>checkPermission</code> method doesn't allow reassigning of the standard input stream.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, <A HREF="../../java/lang/RuntimePermission.html"><CODE>RuntimePermission</CODE></A></DL></DD></DL><HR><A NAME="setOut(java.io.PrintStream)"><!-- --></A><H3>setOut</H3><PRE>public static void <B>setOut</B>(<A HREF="../../java/io/PrintStream.html">PrintStream</A> out)</PRE><DL><DD>Reassigns the "standard" output stream. <p>First, if there is a security manager, its <code>checkPermission</code> method is called with a <code>RuntimePermission("setIO")</code> permission to see if it's ok to reassign the "standard" output stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the new standard output stream<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code>checkPermission</code> method doesn't allow reassigning of the standard output stream.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, <A HREF="../../java/lang/RuntimePermission.html"><CODE>RuntimePermission</CODE></A></DL></DD></DL><HR><A NAME="setErr(java.io.PrintStream)"><!-- --></A><H3>setErr</H3><PRE>public static void <B>setErr</B>(<A HREF="../../java/io/PrintStream.html">PrintStream</A> err)</PRE><DL><DD>Reassigns the "standard" error output stream. <p>First, if there is a security manager, its <code>checkPermission</code> method is called with a <code>RuntimePermission("setIO")</code> permission to see if it's ok to reassign the "standard" error output stream.<DD><DL><DT><B>Parameters:</B><DD><CODE>err</CODE> - the new standard error output stream.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its <code>checkPermission</code> method doesn't allow reassigning of the standard error output stream.<DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, <A HREF="../../java/lang/RuntimePermission.html"><CODE>RuntimePermission</CODE></A></DL></DD></DL><HR><A NAME="setSecurityManager(java.lang.SecurityManager)"><!-- --></A><H3>setSecurityManager</H3><PRE>public static void <B>setSecurityManager</B>(<A HREF="../../java/lang/SecurityManager.html">SecurityManager</A> s)</PRE><DL><DD>Sets the System security. <p> If there is a security manager already installed, this method first calls the security manager's <code>checkPermission</code> method with a <code>RuntimePermission("setSecurityManager")</code> permission to ensure it's ok to replace the existing security manager. This may result in throwing a <code>SecurityException</code>. <p> Otherwise, the argument is established as the current security manager. If the argument is <code>null</code> and no security manager has been established, then no action is taken and the method simply returns.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the security manager.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if the security manager has already been set and its <code>checkPermission</code> method doesn't allow it to be replaced.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#getSecurityManager()"><CODE>getSecurityManager()</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, <A HREF="../../java/lang/RuntimePermission.html"><CODE>RuntimePermission</CODE></A></DL></DD></DL><HR><A NAME="getSecurityManager()"><!-- --></A><H3>getSecurityManager</H3><PRE>public static <A HREF="../../java/lang/SecurityManager.html">SecurityManager</A> <B>getSecurityManager</B>()</PRE><DL><DD>Gets the system security interface.<DD><DL><DT><B>Returns:</B><DD>if a security manager has already been established for the current application, then that security manager is returned; otherwise, <code>null</code> is returned.<DT><B>See Also: </B><DD><A HREF="../../java/lang/System.html#setSecurityManager(java.lang.SecurityManager)"><CODE>setSecurityManager(java.lang.SecurityManager)</CODE></A></DL></DD></DL><HR><A NAME="currentTimeMillis()"><!-- --></A><H3>currentTimeMillis</H3><PRE>public static long <B>currentTimeMillis</B>()</PRE><DL><DD>Returns the current time in milliseconds. <p> See the description of the class <code>Date</code> for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).<DD><DL><DT><B>Returns:</B><DD>the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.<DT><B>See Also: </B><DD><A HREF="../../java/util/Date.html"><CODE>Date</CODE></A></DL></DD></DL><HR><A NAME="arraycopy(java.lang.Object, int, java.lang.Object, int, int)"><!-- --></A><H3>arraycopy</H3><PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -