diff --git a/build.xml b/build.xml
index 1ffb5d65990..a4e089f51fb 100644
--- a/build.xml
+++ b/build.xml
@@ -26,7 +26,6 @@
-
@@ -306,6 +305,8 @@
+
+
@@ -863,7 +864,7 @@
+ includeAntRuntime="false" source="1.6" target="1.6">
diff --git a/compiler/cli/cli-runner/cli-runner.iml b/compiler/cli/cli-runner/cli-runner.iml
index 44071adbdcd..c1303b33ab0 100644
--- a/compiler/cli/cli-runner/cli-runner.iml
+++ b/compiler/cli/cli-runner/cli-runner.iml
@@ -1,11 +1,11 @@
-
+
-
+
diff --git a/compiler/cli/cli-runner/src/org/jetbrains/kotlin/runner/runners.kt b/compiler/cli/cli-runner/src/org/jetbrains/kotlin/runner/runners.kt
index 5ba932c9848..417a94bd21b 100644
--- a/compiler/cli/cli-runner/src/org/jetbrains/kotlin/runner/runners.kt
+++ b/compiler/cli/cli-runner/src/org/jetbrains/kotlin/runner/runners.kt
@@ -77,9 +77,13 @@ class MainClassRunner(override val className: String) : AbstractRunner() {
class JarRunner(private val path: String) : AbstractRunner() {
override val className: String =
try {
- JarFile(path).use { jar ->
+ val jar = JarFile(path)
+ try {
jar.manifest.mainAttributes.getValue(Attributes.Name.MAIN_CLASS)
}
+ finally {
+ jar.close()
+ }
}
catch (e: IOException) {
throw RunnerException("could not read manifest from " + path + ": " + e.message)