HelloWorld.java
=============
package demo;
public class HelloWorld {
public native void displayHelloWorld(String s);
public native String c2java(byte[] mobileNo, byte[] smContent, String str);
public native int get();
public native void set(int i);
public native int getIntLength(int [] ii);
public native void getException()throws Exception;
static {
System.loadLibrary("hello");
}
public static void main(String[] args) throws Exception{
HelloWorld hw = new HelloWorld();
hw.displayHelloWorld("3 ge 1");
hw.set(90);
System.out.println(hw.get());
System.out.println("from c == " + hw.c2java(new byte[]{'h', 'o', '\0'}, new byte[]{'y', 'p', '\0'}, "Leemaasn"));
System.out.println("app1");
System.out.println("app21");
System.out.println("app31");
System.out.println("\nDobule is :" + hw.getIntLength(new int []{1, 2, 3, 4}));
hw.getException();
}
}