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

📄 runtime.java

📁 一个开源的JAVA虚拟机
💻 JAVA
字号:
/*    libaegisvm - The Aegis Virtual Machine for executing Java bytecode    Copyright (C) 2001-2002  Philip W. L. Fong    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Lesser General Public    License as published by the Free Software Foundation; either    version 2.1 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public    License along with this library; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/package java.lang;import aegis.*;import java.io.*;public class Runtime {    private static Runtime theRuntime = new Runtime();    private Runtime() { }    public static Runtime getRuntime() {	return theRuntime;    }    /**     * \todo Not implemented yet.     */    public void exit(int status) {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public void addShutdownHook(Thread hook) {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public boolean removeShutdownHook(Thread hook) {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public void halt(int status) {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public Process exec(String command) throws IOException {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public Process exec(String cmd, String[] envp) throws IOException {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public Process exec(String command, String[] envp, File dir)	throws IOException {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public Process exec(String[] cmdarray) throws IOException {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public Process exec(String[] cmdarray, String[] envp) throws IOException {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public Process exec(String[] cmdarray, String[] envp, File dir)	throws IOException {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public long freeMemory() {	throw new FeatureNotYetImplementedError();    }    /**     * \todo Not implemented yet.     */    public long totalMemory() {	throw new FeatureNotYetImplementedError();    }    public native void gc();    /**     * \todo Not implemented yet.     */    public void runFinalization() {	throw new FeatureNotYetImplementedError();    }    public void traceInstructions(boolean on) { }    public void traceMethodCalls(boolean on) { }    public void load(String filename) {	if (filename == null)	    throw new NullPointerException();	load(filename, System.getCaller(1));    }    static native void load(String filename, Class caller);    public void loadLibrary(String libname) {	if (libname == null)	    throw new NullPointerException();	loadLibrary(libname, System.getCaller(1));    }    static void loadLibrary(String libname, Class caller) {	ClassLoader loader = caller.getClassLoader();	if (loader != null) {	    String abspath = loader.findLibrary(libname);	    if (abspath != null) {		load(abspath, caller);		return;	    }	}	String filename = System.mapLibraryName(libname);	String path = System.getProperty("java.library.path");	String pSepStr = System.getProperty("path.separator");	String fSepStr = System.getProperty("file.separator");	int length = path.length();	char pSep = pSepStr.charAt(0);	char fSep = fSepStr.charAt(0);	for (int i = 0; i < length;) {	    int j = path.indexOf(pSep, i);	    String prefix = (j < 0) ? path.substring(i) : path.substring(i, j);	    try {		load(prefix + fSep + filename, caller);		return;	    } catch (UnsatisfiedLinkError err) {	    }	    if (j < 0)		break;	    i = j + 1;	}	throw new UnsatisfiedLinkError();    }}

⌨️ 快捷键说明

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