Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.net.*;
- /**
- * Dreck
- * Date: 24.10.2014
- * @author Oliver Jessner, Andreas Scheicher
- * @email oliver.jessner@gmx.net
- */
- public class Main {
- public static void main(String [] args) {
- Application app = new Application();
- File file = new File("//Users/oliver//Documents//workspace//Aufgabe1//bin//Animal.class");
- try {
- URL url = file.toURI().toURL();
- URLClassLoader cl = new URLClassLoader(new URL[]{url});
- Class<?> cls = cl.loadClass("Animal");
- app.reconstruct(cls, new PrintStream(new File("/Users/oliver/new.java")));
- } catch (MalformedURLException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- } catch (FileNotFoundException e){
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement