Search rt.jar even if compiler was run with jre

#KT-2599 Fixed
This commit is contained in:
Nikolay Krasko
2013-02-14 14:57:55 +04:00
parent 33fa065162
commit 1aee735775
2 changed files with 26 additions and 22 deletions
@@ -67,8 +67,16 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
"Using Kotlin home directory " + paths.getHomePath(), CompilerMessageLocation.NO_LOCATION);
CompilerConfiguration configuration = new CompilerConfiguration();
configuration.addAll(JVMConfigurationKeys.CLASSPATH_KEY, getClasspath(paths, arguments));
configuration.addAll(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, getAnnotationsPath(paths, arguments));
try {
configuration.addAll(JVMConfigurationKeys.CLASSPATH_KEY, getClasspath(paths, arguments));
configuration.addAll(JVMConfigurationKeys.ANNOTATIONS_PATH_KEY, getAnnotationsPath(paths, arguments));
}
catch (Throwable t) {
messageCollector.report(CompilerMessageSeverity.EXCEPTION, MessageRenderer.PLAIN.renderException(t),
CompilerMessageLocation.NO_LOCATION);
return INTERNAL_ERROR;
}
final List<String> argumentsSourceDirs = arguments.getSourceDirs();
if (!arguments.script &&