// File: native1.java (Module 14) // // Author: Rahul Simha // Created: Dec 8, 1998 // // Illustrates native methods: hello world example. // A class with a native method. class HelloWorld { public native static void hello_world (); } public class native1 { public static void main (String[] argv) { // Need to load the C implementation first. System.loadLibrary ("helloworld"); // Now create an instance and call the method. new HelloWorld().hello_world(); } }