Use correct class loader to load .kotlin_builtins in reflection
#KT-30749 Fixed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user