See last post, assume testlib has a void hello(void) function.

Step 1: Create a wrapper class.
public class TestLibWrapper {
public static native void hello();

static {
System.loadLibrary(“testlib”);
}
}

Step 2: Compile wrapper class.
javac TestLibWrapper.java

Step 3: Run javah to create C header and stub file.
javah TestLibWrapper

Step 4…

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • StumbleUpon
  • Tumblr
  • TwitThis
  • FriendFeed
  • Netvibes
  • Ping.fm
  • Posterous
  • Technorati
  • Tipd
  • Twitter
  • Yahoo! Buzz