class HelloWorld { static public native void displayHelloWorld(); static { try { System.loadLibrary("hello"); } catch ( UnsatisfiedLinkError aError ) { System.out.println ( "Couldn't find the native library " + aError.getMessage() ); } catch ( SecurityException aError ) { System.out.println ( "Wasn't allowed to load the native library " + aError.getMessage() ); } } public static void main(String[] args) { displayHelloWorld(); } }