Change on filepath
This commit is contained in:
parent
94c037467e
commit
458983fc68
@ -35,15 +35,13 @@ public class ClassCodeGen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void printIntoClassFile(byte[] byteCode, String name) {
|
private void printIntoClassFile(byte[] byteCode, String name) {
|
||||||
String filePath = "src/main/java/classFileOutput/" + name + ".class";
|
|
||||||
|
|
||||||
String directoryPath = "src/main/java/classFileOutput";
|
String directoryPath = "src/main/java/classFileOutput";
|
||||||
File directory = new File(directoryPath);
|
File directory = new File(directoryPath);
|
||||||
if (!directory.exists()) {
|
if (!directory.exists()) {
|
||||||
directory.mkdirs();
|
directory.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String filePath = directoryPath + "/" + name + ".class";
|
||||||
try {
|
try {
|
||||||
FileOutputStream fileOutputStream = new FileOutputStream(filePath);
|
FileOutputStream fileOutputStream = new FileOutputStream(filePath);
|
||||||
fileOutputStream.write(byteCode);
|
fileOutputStream.write(byteCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user