Fix #308
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Has been cancelled
This commit is contained in:
parent
4b110244f2
commit
e59accf7ee
@ -58,6 +58,7 @@ import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.nio.file.Path;
|
||||
import java.sql.Array;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
@ -769,9 +770,8 @@ public class JavaTXCompiler {
|
||||
for (JavaClassName name : classFiles.keySet()) {
|
||||
byte[] bytecode = classFiles.get(name);
|
||||
System.out.println("generating " + name + ".class file ...");
|
||||
// output = new FileOutputStream(new File(System.getProperty("user.dir") +
|
||||
// "/testBytecode/generatedBC/" +name+".class"));
|
||||
File outputFile = new File(path, name.getClassName() + ".class");
|
||||
var subPath = Path.of(path.toString(), name.getPackageName().split("\\.")).toFile();
|
||||
File outputFile = new File(subPath, name.getClassName() + ".class");
|
||||
outputFile.getAbsoluteFile().getParentFile().mkdirs();
|
||||
output = new FileOutputStream(outputFile);
|
||||
output.write(bytecode);
|
||||
|
@ -7,7 +7,7 @@ import java.util.List;
|
||||
|
||||
public class TestPackages {
|
||||
|
||||
private static final String bytecodeDirectory = System.getProperty("user.dir") + "targetTest";
|
||||
private static final String bytecodeDirectory = System.getProperty("user.dir") + "/targetTest";
|
||||
|
||||
@Test
|
||||
public void testPackages() throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user