/**
* In the D:/LoadLibrary we must have .class and the same interface (TestString) with the same pacakge as the 
* main program. 
*/
URL urlToJar = new URL("file://D:/LoadLibrary/");
URLClassLoader cl = new URLClassLoader(new URL[] { urlToJar });
		
System.out.println("loading...");
Class c2 = cl.loadClass("TestHelloWorld");
System.out.println("loaded!");
Object nouObject = c2.newInstance();

TestString ts = (TestString) cons.newInstance(args);
/**
* Now we can use the "ts" object as a normal TestString interface. No matter which is the implementation that is begin it.
*/
System.out.println("S1: " + ts.printS1());
System.out.println("S2: " + ts.printS2());