2007-02-13 Andrew Haley <aph@redhat.com>
[gcc.git] / libjava / testsuite / libjava.jni / pr29812.java
1 import java.io.File;
2 import java.net.*;
3 import java.lang.reflect.Method;
4
5 public class pr29812
6 {
7 static {
8 System.loadLibrary("pr29812");
9 }
10
11 public static native void baseN();
12
13 public static void main(String[] args) throws Throwable
14 {
15 // Make sure JNI environment is initialized.
16 baseN();
17
18 File jar = new File(args[0]);
19 URL u = jar.toURL();
20 URLClassLoader uc = new URLClassLoader(new URL[] { u });
21 Class k = uc.loadClass("pr29812_injar");
22 Method m = k.getMethod("doit", (Class[]) null);
23 m.invoke(null, (Object[]) null);
24 }
25 }