Add jdk jars to kotlin classpath

#KT-4214 Fixed
This commit is contained in:
Natalia Ukhorskaya
2013-12-23 18:29:30 +04:00
parent 4bc94e86c0
commit f2f1a1313d
36 changed files with 653 additions and 127 deletions
@@ -47,7 +47,9 @@ public object JavaToKotlinTranslator {
fun setUpJavaCoreEnvironment(): JavaCoreProjectEnvironment {
val applicationEnvironment = JavaCoreApplicationEnvironment(DISPOSABLE)
val javaCoreEnvironment = JavaCoreProjectEnvironment(DISPOSABLE, applicationEnvironment)
javaCoreEnvironment.addJarToClassPath(PathUtil.findRtJar())
for (root in PathUtil.getJdkClassesRoots()) {
javaCoreEnvironment.addJarToClassPath(root)
}
val annotations: File? = findAnnotations()
if (annotations != null && annotations.exists()) {
javaCoreEnvironment.addJarToClassPath(annotations)