OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.jni/] [init.java] - Rev 830

Go to most recent revision | Compare with Previous | Blame | View Log

// 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();
  }
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.