39 |
|
|
40 |
package java.lang; |
package java.lang; |
41 |
|
|
|
import gnu.classpath.VMStackWalker; |
|
42 |
import gnu.classpath.SystemProperties; |
import gnu.classpath.SystemProperties; |
43 |
|
|
44 |
import java.io.InputStream; |
import java.io.InputStream; |
480 |
* check may be performed, <code>checkLink</code>. This just calls |
* check may be performed, <code>checkLink</code>. This just calls |
481 |
* <code>Runtime.getRuntime().load(filename)</code>. |
* <code>Runtime.getRuntime().load(filename)</code>. |
482 |
* |
* |
|
* <p> |
|
|
* The library is loaded using the class loader associated with the |
|
|
* class associated with the invoking method. |
|
|
* |
|
483 |
* @param filename the code file to load |
* @param filename the code file to load |
484 |
* @throws SecurityException if permission is denied |
* @throws SecurityException if permission is denied |
485 |
* @throws UnsatisfiedLinkError if the file cannot be loaded |
* @throws UnsatisfiedLinkError if the file cannot be loaded |
487 |
*/ |
*/ |
488 |
public static void load(String filename) |
public static void load(String filename) |
489 |
{ |
{ |
490 |
Runtime.getRuntime().load(filename, VMStackWalker.getCallingClassLoader()); |
Runtime.getRuntime().load(filename); |
491 |
} |
} |
492 |
|
|
493 |
/** |
/** |
495 |
* check may be performed, <code>checkLink</code>. This just calls |
* check may be performed, <code>checkLink</code>. This just calls |
496 |
* <code>Runtime.getRuntime().load(filename)</code>. |
* <code>Runtime.getRuntime().load(filename)</code>. |
497 |
* |
* |
|
* <p> |
|
|
* The library is loaded using the class loader associated with the |
|
|
* class associated with the invoking method. |
|
|
* |
|
498 |
* @param libname the library file to load |
* @param libname the library file to load |
499 |
* @throws SecurityException if permission is denied |
* @throws SecurityException if permission is denied |
500 |
* @throws UnsatisfiedLinkError if the file cannot be loaded |
* @throws UnsatisfiedLinkError if the file cannot be loaded |
502 |
*/ |
*/ |
503 |
public static void loadLibrary(String libname) |
public static void loadLibrary(String libname) |
504 |
{ |
{ |
505 |
Runtime.getRuntime().loadLibrary(libname, |
Runtime.getRuntime().loadLibrary(libname); |
|
VMStackWalker.getCallingClassLoader()); |
|
506 |
} |
} |
507 |
|
|
508 |
/** |
/** |