Add jdk jars to kotlin classpath
#KT-4214 Fixed
This commit is contained in:
@@ -165,7 +165,7 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
|
||||
private static List<File> getClasspath(@NotNull KotlinPaths paths, @NotNull K2JVMCompilerArguments arguments) {
|
||||
List<File> classpath = Lists.newArrayList();
|
||||
if (!arguments.noJdk) {
|
||||
classpath.add(PathUtil.findRtJar());
|
||||
classpath.addAll(PathUtil.getJdkClassesRoots());
|
||||
}
|
||||
if (!arguments.noStdlib) {
|
||||
classpath.add(paths.getRuntimePath());
|
||||
|
||||
@@ -98,7 +98,7 @@ public class CompileEnvironmentUtil {
|
||||
if (runtimePath.exists()) {
|
||||
configuration.add(JVMConfigurationKeys.CLASSPATH_KEY, runtimePath);
|
||||
}
|
||||
configuration.add(JVMConfigurationKeys.CLASSPATH_KEY, PathUtil.findRtJar());
|
||||
configuration.addAll(JVMConfigurationKeys.CLASSPATH_KEY, PathUtil.getJdkClassesRoots());
|
||||
File jdkAnnotationsPath = paths.getJdkAnnotationsPath();
|
||||
if (jdkAnnotationsPath.exists()) {
|
||||
configuration.add(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, jdkAnnotationsPath);
|
||||
|
||||
Reference in New Issue
Block a user