You can proceed as follows:
File myFolder = new File("myfolder");
URLClassLoader classLoader = new URLClassLoader(new URL[]{myFolder.toURI().toURL()}, Thread.currentThread().getContextClassLoader());
Class<?> myClass = Class.forName("my.package.Myclass", true, classLoader);
Myclass obj = (Myclass)myClass.newInstance();
First, you create an instance URLClassLoaderusing the context Classloaderas the parent, then load the class using this new one, Classloaderand finally create the instance (here it calls the constructor with no arguments).