diff --git a/src/main/java/bytecode/ClassCodeGen.java b/src/main/java/bytecode/ClassCodeGen.java index e9eb641..77316a6 100644 --- a/src/main/java/bytecode/ClassCodeGen.java +++ b/src/main/java/bytecode/ClassCodeGen.java @@ -35,15 +35,13 @@ public class ClassCodeGen { } private void printIntoClassFile(byte[] byteCode, String name) { - String filePath = "src/main/java/classFileOutput/" + name + ".class"; - String directoryPath = "src/main/java/classFileOutput"; File directory = new File(directoryPath); if (!directory.exists()) { directory.mkdirs(); } - + String filePath = directoryPath + "/" + name + ".class"; try { FileOutputStream fileOutputStream = new FileOutputStream(filePath); fileOutputStream.write(byteCode);