Use correct class loader to load .kotlin_builtins in reflection

#KT-30749 Fixed
This commit is contained in:
Alexander Udalov
2019-04-03 11:43:56 +02:00
parent 3de723b8d0
commit 5bafd4008f
4 changed files with 73 additions and 1 deletions
@@ -0,0 +1,15 @@
import java.io.*;
import java.net.*;
public class Main {
public static void main(String[] args) throws Exception {
URL[] urls = new URL[args.length];
for (int i = 0; i < args.length; i++) {
urls[i] = new File(args[i]).toURI().toURL();
}
ClassLoader cl = new URLClassLoader(urls);
Class<?> c = cl.loadClass("TestKt");
c.getDeclaredMethods()[0].invoke(null);
}
}