From d5bd8eebff4b7e4305c9bc762ebf1bd0ed7afaac Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 15 Oct 2013 19:10:32 +0400 Subject: [PATCH] Add kotlin-runtime.jar to the class loader when invoking compiler TopLevelMembersInvocationTestGenerated failed locally because the compiler couldn't find runtime classes --- compiler/tests/org/jetbrains/jet/MockLibraryUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/MockLibraryUtil.java b/compiler/tests/org/jetbrains/jet/MockLibraryUtil.java index 242da1d7140..b9b412ea969 100644 --- a/compiler/tests/org/jetbrains/jet/MockLibraryUtil.java +++ b/compiler/tests/org/jetbrains/jet/MockLibraryUtil.java @@ -79,10 +79,11 @@ public class MockLibraryUtil { @NotNull private static Class getCompilerClass() throws MalformedURLException, ClassNotFoundException { - if (compilerClass == null) { File kotlinCompilerJar = new File(PathUtil.getKotlinPathsForDistDirectory().getLibPath(), "kotlin-compiler.jar"); - URLClassLoader classLoader = new URLClassLoader(new URL[] {kotlinCompilerJar.toURI().toURL()}, Object.class.getClassLoader()); + File kotlinRuntimeJar = new File(PathUtil.getKotlinPathsForDistDirectory().getLibPath(), "kotlin-runtime.jar"); + URLClassLoader classLoader = new URLClassLoader(new URL[] {kotlinCompilerJar.toURI().toURL(), kotlinRuntimeJar.toURI().toURL()}, + Object.class.getClassLoader()); compilerClass = classLoader.loadClass(K2JVMCompiler.class.getName()); }