Changed the generation to a .class
This commit is contained in:
parent
80917ec222
commit
8419b1aa17
@ -61,7 +61,16 @@ public class Program {
|
|||||||
cw.visitEnd();
|
cw.visitEnd();
|
||||||
byte[] bytecode = cw.toByteArray();
|
byte[] bytecode = cw.toByteArray();
|
||||||
|
|
||||||
// Write the bytecode to a .class file in the .jar file
|
try (FileOutputStream fos = new FileOutputStream(oneClass.name + ".class")) {
|
||||||
|
fos.write(bytecode);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*// Write the bytecode to a .class file in the .jar file
|
||||||
JarEntry entry = new JarEntry(oneClass.name + ".class");
|
JarEntry entry = new JarEntry(oneClass.name + ".class");
|
||||||
jos.putNextEntry(entry);
|
jos.putNextEntry(entry);
|
||||||
jos.write(bytecode);
|
jos.write(bytecode);
|
||||||
@ -69,7 +78,7 @@ public class Program {
|
|||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for(RefType oneClass : classes){
|
for(RefType oneClass : classes){
|
||||||
|
Loading…
Reference in New Issue
Block a user