byte[] data = ProxyGenerator.generateProxyClass("$Proxy0",new Class[]{dynamicProxyTest.class}); FileOutputStream out = null; try { File file=new File("E:\$Proxy0.class"); file.createNewFile(); out = new FileOutputStream(file); out.write(data); out.close(); }catch (Exception e) { e.printStackTrace(); }