Using the forName() method
public class Main { public static void main(String[] argv) throws Exception { Class cc = null; cc = Class.forName("Main.class"); } }