summaryrefslogtreecommitdiff
path: root/libjava/java/lang/Runtime.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-08 00:26:58 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2000-02-08 00:26:58 +0000
commit0cd3cd1f20d9cb9e5079e8ee5ab36590aabeb4e1 (patch)
tree8f96de6d10a1be2f4df62afb63420832f7de519b /libjava/java/lang/Runtime.java
parentd47a5739e8f206d77cafea564bdbfb628abc1df0 (diff)
downloadgcc-0cd3cd1f20d9cb9e5079e8ee5ab36590aabeb4e1.tar.gz
* java/lang/Runtime.java (_load): Declare.
(load, loadLibrary): Wrote in terms of _load. * java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in library. (loadLibrary): Likewise. Include <jni.h>. (_load): New method. (loadLibrary, load): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31846 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/Runtime.java')
-rw-r--r--libjava/java/lang/Runtime.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/libjava/java/lang/Runtime.java b/libjava/java/lang/Runtime.java
index dcd89e09090..752733e2724 100644
--- a/libjava/java/lang/Runtime.java
+++ b/libjava/java/lang/Runtime.java
@@ -23,8 +23,7 @@ import java.util.StringTokenizer;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
- * Status: All 1.1 methods exist. exec(), load(), and loadLibrary()
- * are not fully implemented.
+ * Status: All 1.1 methods exist. exec() is not fully implemented.
*/
public class Runtime
@@ -94,8 +93,17 @@ public class Runtime
s.checkLink(lib);
}
- public native void load (String pathname);
- public native void loadLibrary (String libname);
+ private native void _load (String pathname, boolean do_search);
+
+ public void load (String pathname)
+ {
+ _load (pathname, false);
+ }
+
+ public void loadLibrary (String libname)
+ {
+ _load (libname, true);
+ }
// This is a helper function for the ClassLoader which can load
// compiled libraries. Returns true if library (which is just the