Improve the java class loader and add test codes