init.c: New file.
* testsuite/libjava.jni/init.c: New file. * testsuite/libjava.jni/init.java: New file. * testsuite/libjava.jni/init.out: New file. * testsuite/libjava.jni/init.jar: New file. * testsuite/libjava.jni/init.h: New file. * testsuite/libjava.jni/init$NativeClass.h: New file. From-SVN: r121698
This commit is contained in:
parent
28890c8243
commit
0ccadf458d
7 changed files with 83 additions and 0 deletions
26
libjava/testsuite/libjava.jni/init.java
Normal file
26
libjava/testsuite/libjava.jni/init.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
// Regression test for JNI and static initializers.
|
||||
|
||||
public class init
|
||||
{
|
||||
public static class NativeClass
|
||||
{
|
||||
static
|
||||
{
|
||||
System.out.println("static initializer 2");
|
||||
System.loadLibrary("init"); // if it's here, this app doesn't work
|
||||
}
|
||||
|
||||
public static native void printHello();
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
System.out.println("static initializer 1");
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
//System.loadLibrary("test"); // if it's here, this app works
|
||||
NativeClass.printHello();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue