system.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 1,156 行 · 第 1/5 页

HTML
1,156
字号
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="System.html#getProperty(java.lang.String, java.lang.String)">getProperty</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;key,            <A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;def)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;获得用指定键描述的系统属性。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="SecurityManager.html" title="java.lang 中的类">SecurityManager</A></CODE></FONT></TD><TD><CODE><B><A HREF="System.html#getSecurityManager()">getSecurityManager</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;获得系统安全接口。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#identityHashCode(java.lang.Object)">identityHashCode</A></B>(<A HREF="Object.html" title="java.lang 中的类">Object</A>&nbsp;x)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回给定对象的哈希代码,该代码与默认的方法 hashCode() 返回的代码一样,无论给定对象的类是否重写 hashCode()。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.nio.channels.Channel</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#inheritedChannel()">inheritedChannel</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回从创建此 Java 虚拟机的实体中继承的信道。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#load(java.lang.String)">load</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;filename)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从本地文件系统中作为动态库加载具有指定文件名的代码文件。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#loadLibrary(java.lang.String)">loadLibrary</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;libname)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;加载由 <code>libname</code> 参数指定的系统库。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="System.html#mapLibraryName(java.lang.String)">mapLibraryName</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;libname)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将一个库名称映射到特定于平台的、表示本机库的字符串中。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#nanoTime()">nanoTime</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回最准确的可用系统计时器的当前值,以毫微秒为单位。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#runFinalization()">runFinalization</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;运行处于挂起终止状态的所有对象的终止方法。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#runFinalizersOnExit(boolean)">runFinalizersOnExit</A></B>(boolean&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>已过时。</B>&nbsp;<I>该方法具有固有的不安全性。它可能对正在使用的对象调用终结方法,而其他线程同时正在操作这些对象,从而导致不正确的行为或死锁。</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#setErr(java.io.PrintStream)">setErr</A></B>(java.io.PrintStream&nbsp;err)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;重新分配&ldquo;标准&rdquo;错误输出流。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#setIn(java.io.InputStream)">setIn</A></B>(java.io.InputStream&nbsp;in)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;重新分配&ldquo;标准&rdquo;输入流。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#setOut(java.io.PrintStream)">setOut</A></B>(java.io.PrintStream&nbsp;out)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;重新分配&ldquo;标准&rdquo;输出流。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#setProperties(java.util.Properties)">setProperties</A></B>(<A HREF="../util/Properties.html" title="java.util 中的类">Properties</A>&nbsp;props)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;将系统属性设置为 <code>Properties</code> 参数。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="System.html#setProperty(java.lang.String, java.lang.String)">setProperty</A></B>(<A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;key,            <A HREF="String.html" title="java.lang 中的类">String</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置指定键指示的系统属性。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="System.html#setSecurityManager(java.lang.SecurityManager)">setSecurityManager</A></B>(<A HREF="SecurityManager.html" title="java.lang 中的类">SecurityManager</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置系统安全性。</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>从类 java.lang.<A HREF="Object.html" title="java.lang 中的类">Object</A> 继承的方法</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="Object.html#clone()">clone</A>, <A HREF="Object.html#equals(java.lang.Object)">equals</A>, <A HREF="Object.html#finalize()">finalize</A>, <A HREF="Object.html#getClass()">getClass</A>, <A HREF="Object.html#hashCode()">hashCode</A>, <A HREF="Object.html#notify()">notify</A>, <A HREF="Object.html#notifyAll()">notifyAll</A>, <A HREF="Object.html#toString()">toString</A>, <A HREF="Object.html#wait()">wait</A>, <A HREF="Object.html#wait(long)">wait</A>, <A HREF="Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>字段详细信息</B></FONT></TH></TR></TABLE><A NAME="in"><!-- --></A><H3>in</H3><PRE>public static final java.io.InputStream <B>in</B></PRE><DL><DD>&ldquo;标准&rdquo;输入流。此流已打开并准备提供输入数据。通常,此流对应于键盘输入或者由主机环境或用户指定的另一个输入源。<P><DL></DL></DL><HR><A NAME="out"><!-- --></A><H3>out</H3><PRE>public static final java.io.PrintStream <B>out</B></PRE><DL><DD>&ldquo;标准&rdquo;输出流。此流已打开并准备接受输出数据。通常,此流对应于显示器输出或者由主机环境或用户指定的另一个输出目标。 <p>对于简单独立的 Java 应用程序,编写一行输出数据的典型方式是: <blockquote><pre>     System.out.println(data) </pre></blockquote> <p>请参阅 <code>PrintStream</code> 类中的 <code>println</code> 方法。<P><DL><DT><B>另请参见:</B><DD><CODE>PrintStream.println()</CODE>, <CODE>PrintStream.println(boolean)</CODE>, <CODE>PrintStream.println(char)</CODE>, <CODE>PrintStream.println(char[])</CODE>, <CODE>PrintStream.println(double)</CODE>, <CODE>PrintStream.println(float)</CODE>, <CODE>PrintStream.println(int)</CODE>, <CODE>PrintStream.println(long)</CODE>, <CODE>PrintStream.println(java.lang.Object)</CODE>, <CODE>PrintStream.println(java.lang.String)</CODE></DL></DL><HR><A NAME="err"><!-- --></A><H3>err</H3><PRE>public static final java.io.PrintStream <B>err</B></PRE><DL><DD>&ldquo;标准&rdquo;错误输出流。此流已打开并准备接受输出数据。 <p>通常,此流对应于显示器输出或者由主机环境或用户指定的另一个输出目标。按照惯例,此输出流用于显示错误消息,或者显示那些即使用户输出流(变量 <code>out</code> 的值)已经重定向到通常不被连续监视的某一文件或其他目标,也应该立刻引起用户注意的其他信息。<P><DL></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>方法详细信息</B></FONT></TH></TR></TABLE><A NAME="setIn(java.io.InputStream)"><!-- --></A><H3>setIn</H3><PRE>public static void <B>setIn</B>(java.io.InputStream&nbsp;in)</PRE><DL><DD>重新分配&ldquo;标准&rdquo;输入流。<p>首先,如果有安全管理器,则通过 <code>RuntimePermission(&quot;setIO&quot;)</code> 权限调用其 <code>checkPermission</code> 方法,查看是否可以重新分配&ldquo;标准&rdquo;输入流。 <p><P><DD><DL><DT><B>参数:</B><DD><CODE>in</CODE> - 新的标准输出流。<DT><B>抛出:</B><DD><CODE><A HREF="SecurityException.html" title="java.lang 中的类">SecurityException</A></CODE> - 如果安全管理器存在并且其 <code>checkPermission</code> 方法不允许重新分配标准输入流。<DT><B>从以下版本开始:</B></DT>  <DD>JDK1.1</DD><DT><B>另请参见:</B><DD><A HREF="SecurityManager.html#checkPermission(java.security.Permission)"><CODE>SecurityManager.checkPermission(java.security.Permission)</CODE></A>, 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?