⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 runtime.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<DD>Runs the garbage collector. Calling this method suggests that the Java Virtual Machine expend  effort toward recycling unused objects in order to make the memory  they currently occupy available for quick reuse. When control  returns from the method call, the Java Virtual Machine has made  its best effort to recycle all discarded objects.  <p> The name <code>gc</code> stands for "garbage  collector". The Java Virtual Machine performs this recycling  process automatically as needed, in a separate thread, even if the  <code>gc</code> method is not invoked explicitly. <p> The method <A HREF="../../java/lang/System.html#gc()"><CODE>System.gc()</CODE></A> is hte conventional and convenient  means of invoking this method.</DL><HR><A NAME="runFinalization()"><!-- --></A><H3>runFinalization</H3><PRE>public void <B>runFinalization</B>()</PRE><DL><DD>Runs the finalization methods of any objects pending finalization. Calling this method suggests that the Java Virtual Machine expend  effort toward running the <code>finalize</code> methods of objects  that have been found to be discarded but whose <code>finalize</code>  methods have not yet been run. When control returns from the  method call, the Java Virtual Machine has made a best effort to  complete all outstanding finalizations.  <p> The Java Virtual Machine performs the finalization process  automatically as needed, in a separate thread, if the  <code>runFinalization</code> method is not invoked explicitly.  <p> The method <A HREF="../../java/lang/System.html#runFinalization()"><CODE>System.runFinalization()</CODE></A> is the conventional  and convenient means of invoking this method.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/lang/Object.html#finalize()"><CODE>Object.finalize()</CODE></A></DL></DD></DL><HR><A NAME="traceInstructions(boolean)"><!-- --></A><H3>traceInstructions</H3><PRE>public void <B>traceInstructions</B>(boolean&nbsp;on)</PRE><DL><DD>Enables/Disables tracing of instructions. If the <code>boolean</code> argument is <code>true</code>, this  method suggests that the Java Virtual Machine emit debugging  information for each instruction in the Java Virtual Machine as it  is executed. The format of this information, and the file or other  output stream to which it is emitted, depends on the host environment.  The virtual machine may ignore this request if it does not support  this feature. The destination of the trace output is system  dependent.  <p> If the <code>boolean</code> argument is <code>false</code>, this  method causes the Java Virtual Machine to stop performing the  detailed instruction trace it is performing.<DD><DL><DT><B>Parameters:</B><DD><CODE>on</CODE> - <code>true</code> to enable instruction tracing;               <code>false</code> to disable this feature.</DL></DD></DL><HR><A NAME="traceMethodCalls(boolean)"><!-- --></A><H3>traceMethodCalls</H3><PRE>public void <B>traceMethodCalls</B>(boolean&nbsp;on)</PRE><DL><DD>Enables/Disables tracing of method calls. If the <code>boolean</code> argument is <code>true</code>, this  method suggests that the Java Virtual Machine emit debugging  information for each method in the Java Virtual Machine as it is  called. The format of this information, and the file or other output  stream to which it is emitted, depends on the host environment. The  virtual machine may ignore this request if it does not support  this feature.   <p> Calling this method with argument false suggests that the Java  Virtual Machine cease emitting per-call debugging information.<DD><DL><DT><B>Parameters:</B><DD><CODE>on</CODE> - <code>true</code> to enable instruction tracing;               <code>false</code> to disable this feature.</DL></DD></DL><HR><A NAME="load(java.lang.String)"><!-- --></A><H3>load</H3><PRE>public void <B>load</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;filename)</PRE><DL><DD>Loads the specified filename as a dynamic library. The filename  argument must be a complete pathname.  From <code>java_g</code> it will automagically insert "_g" before the ".so" (for example <code>Runtime.getRuntime().load("/home/avh/lib/libX11.so");</code>). <p> First, if there is a security manager, its <code>checkLink</code>  method is called with the <code>filename</code> as its argument.  This may result in a security exception.  <p> This is similar to the method <A HREF="../../java/lang/Runtime.html#loadLibrary(java.lang.String)"><CODE>loadLibrary(String)</CODE></A>, but it  accepts a general file name as an argument rathan than just a library  name, allowing any file of native code to be loaded. <p> The method <A HREF="../../java/lang/System.html#load(java.lang.String)"><CODE>System.load(String)</CODE></A> is the conventional and  convenient means of invoking this method.<DD><DL><DT><B>Parameters:</B><DD><CODE>filename</CODE> - the file to load.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its               <code>checkLink</code> method doesn't allow              loading of the specified dynamic library<DD><CODE><A HREF="../../java/lang/UnsatisfiedLinkError.html">UnsatisfiedLinkError</A></CODE> - if the file does not exist.<DT><B>See Also: </B><DD><A HREF="../../java/lang/Runtime.html#getRuntime()"><CODE>getRuntime()</CODE></A>, <A HREF="../../java/lang/SecurityException.html"><CODE>SecurityException</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkLink(java.lang.String)"><CODE>SecurityManager.checkLink(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="loadLibrary(java.lang.String)"><!-- --></A><H3>loadLibrary</H3><PRE>public void <B>loadLibrary</B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;libname)</PRE><DL><DD>Loads the dynamic library with the specified library name.  A file containing native code is loaded from the local file system  from a place where library files are conventionally obtained. The  details of this process are implementation-dependent. The  mapping from a library name to a specific filename is done in a  system-specific manner.  <p> First, if there is a security manager, its <code>checkLink</code>  method is called with the <code>libname</code> as its argument.  This may result in a security exception.  <p> The method <A HREF="../../java/lang/System.html#loadLibrary(java.lang.String)"><CODE>System.loadLibrary(String)</CODE></A> is the conventional  and convenient means of invoking this method. If native methods are to be used in the implementation of a class, a standard  strategy is to put the native code in a library file (call it  <code>LibFile</code>) and then to put a static initializer: <blockquote><pre> static { System.loadLibrary("LibFile"); } </pre></blockquote> within the class declaration. When the class is loaded and  initialized, the necessary native code implementation for the native  methods will then be loaded as well.  <p> If this method is called more than once with the same library  name, the second and subsequent calls are ignored.<DD><DL><DT><B>Parameters:</B><DD><CODE>libname</CODE> - the name of the library.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/SecurityException.html">SecurityException</A></CODE> - if a security manager exists and its               <code>checkLink</code> method doesn't allow              loading of the specified dynamic library<DD><CODE><A HREF="../../java/lang/UnsatisfiedLinkError.html">UnsatisfiedLinkError</A></CODE> - if the library does not exist.<DT><B>See Also: </B><DD><A HREF="../../java/lang/SecurityException.html"><CODE>SecurityException</CODE></A>, <A HREF="../../java/lang/SecurityManager.html#checkLink(java.lang.String)"><CODE>SecurityManager.checkLink(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getLocalizedInputStream(java.io.InputStream)"><!-- --></A><H3>getLocalizedInputStream</H3><PRE>public <A HREF="../../java/io/InputStream.html">InputStream</A> <B>getLocalizedInputStream</B>(<A HREF="../../java/io/InputStream.html">InputStream</A>&nbsp;in)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK&nbsp;1.1, the preferred way translate a byte stream in the local encoding into a character stream in Unicode is via the <code>InputStreamReader</code> and <code>BufferedReader</code> classes.</I><P><DD>Creates a localized version of an input stream. This method takes  an <code>InputStream</code> and returns an <code>InputStream</code>  equivalent to the argument in all respects except that it is  localized: as characters in the local character set are read from  the stream, they are automatically converted from the local  character set to Unicode.  <p> If the argument is already a localized stream, it may be returned  as the result.<DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - InputStream to localize<DT><B>Returns:</B><DD>a localized input stream<DT><B>See Also: </B><DD><A HREF="../../java/io/InputStream.html"><CODE>InputStream</CODE></A>, <A HREF="../../java/io/BufferedReader.html#BufferedReader(java.io.Reader)"><CODE>BufferedReader.BufferedReader(java.io.Reader)</CODE></A>, <A HREF="../../java/io/InputStreamReader.html#InputStreamReader(java.io.InputStream)"><CODE>InputStreamReader.InputStreamReader(java.io.InputStream)</CODE></A></DL></DD></DL><HR><A NAME="getLocalizedOutputStream(java.io.OutputStream)"><!-- --></A><H3>getLocalizedOutputStream</H3><PRE>public <A HREF="../../java/io/OutputStream.html">OutputStream</A> <B>getLocalizedOutputStream</B>(<A HREF="../../java/io/OutputStream.html">OutputStream</A>&nbsp;out)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>As of JDK&nbsp;1.1, the preferred way to translate a Unicode character stream into a byte stream in the local encoding is via the <code>OutputStreamWriter</code>, <code>BufferedWriter</code>, and <code>PrintWriter</code> classes.</I><P><DD>Creates a localized version of an output stream. This method  takes an <code>OutputStream</code> and returns an  <code>OutputStream</code> equivalent to the argument in all respects  except that it is localized: as Unicode characters are written to  the stream, they are automatically converted to the local  character set.  <p> If the argument is already a localized stream, it may be returned  as the result.<DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - OutputStream to localize<DT><B>Returns:</B><DD>a localized output stream<DT><B>See Also: </B><DD><A HREF="../../java/io/OutputStream.html"><CODE>OutputStream</CODE></A>, <A HREF="../../java/io/BufferedWriter.html#BufferedWriter(java.io.Writer)"><CODE>BufferedWriter.BufferedWriter(java.io.Writer)</CODE></A>, <A HREF="../../java/io/OutputStreamWriter.html#OutputStreamWriter(java.io.OutputStream)"><CODE>OutputStreamWriter.OutputStreamWriter(java.io.OutputStream)</CODE></A>, <A HREF="../../java/io/PrintWriter.html#PrintWriter(java.io.OutputStream)"><CODE>PrintWriter.PrintWriter(java.io.OutputStream)</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Runtime.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../java/lang/Process.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../java/lang/RuntimePermission.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>  &nbsp;&nbsp;<A HREF="Runtime.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation  contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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