|
@@ -92,7 +92,11 @@ public class JavaBytecodeRunUnit {
|
92
|
92
|
directory.mkdirs();
|
93
|
93
|
|
94
|
94
|
for (Map.Entry<String, byte[]> classEntry : classes.entrySet()) {
|
95
|
|
- File output = new File(directory, classEntry.getKey() + ".class");
|
|
95
|
+ File output = new File(directory, classEntry.getKey().replace('.', File.separatorChar) + ".class");
|
|
96
|
+ if (!output.getParentFile().exists() && !output.getParentFile().mkdirs()) {
|
|
97
|
+ //Throw error?
|
|
98
|
+ continue;
|
|
99
|
+ }
|
96
|
100
|
try (FileOutputStream outputStream = new FileOutputStream(output)) {
|
97
|
101
|
outputStream.write(classEntry.getValue());
|
98
|
102
|
} catch (IOException ex) {
|