Change on filepath

This commit is contained in:
i22007 2024-05-08 16:12:04 +02:00
parent 94c037467e
commit 458983fc68

View File

@ -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);