Allow relative paths by getting the absolute file (seriously Java)
This commit is contained in:
parent
f588ece7c3
commit
ec04f01a10
@ -75,7 +75,7 @@ public class CompilationEnvironment {
|
||||
ClassLoader classLoader = compiler.getClassLoader();
|
||||
List<Class> ret = new ArrayList<>();
|
||||
// Set classLoader to include default package for this specific source file
|
||||
File dir = sourceFile.getParentFile();
|
||||
File dir = sourceFile.getAbsoluteFile().getParentFile();
|
||||
String dirPath = dir.toString() + "/";
|
||||
if (packageName.length() > 0)
|
||||
dirPath = dirPath.substring(0, dirPath.length() - packageName.length() - 1);
|
||||
|
Loading…
Reference in New Issue
Block a user