2007-02-13 Andrew Haley <aph@redhat.com>
[gcc.git] / libjava / testsuite / libjava.jni / init.java
1 // Regression test for JNI and static initializers.
2
3 public class init
4 {
5 public static class NativeClass
6 {
7 static
8 {
9 System.out.println("static initializer 2");
10 System.loadLibrary("init"); // if it's here, this app doesn't work
11 }
12
13 public static native void printHello();
14 }
15
16 static
17 {
18 System.out.println("static initializer 1");
19 }
20
21 public static void main(String[] args)
22 {
23 //System.loadLibrary("test"); // if it's here, this app works
24 NativeClass.printHello();
25 }
26 }