# Kotlin 1.4.21 - where is kotlin-runtime.jar

**URL:** <https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655>\
**Category:** Support\
**Created:** [January 25, 2021, 9:26pm UTC](https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655 "2021-01-25T21:26:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Woland](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@Woland](https://discuss.kotlinlang.org/u/Woland)\
**Post date:** [January 25, 2021, 9:26pm UTC](https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655/1 "2021-01-25T21:26:10Z")

</div>

Just making first step into Kotlin. Running on Win10 with Java 8.  
Tried the CL compiler - downloaded and unzipped kotlin-compiler-1.4.21.zip from GitHub.  
Added ‘kotlinc\bin’ to path. Compiler creates .class file and I can run ‘kotlin HelloKt’.  
But not ‘java HelloKt’ - getting ‘java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics’  
OK so online tutorial says need ‘kotlin-runtime.jar’ in classpath.  
Except that there is no such JAR in ‘lib’ folder.  
I can run this:  
java -cp .;D:\work\kotlinc\lib\kotlin-runner.jar HelloKt  
but that is different JAR.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [January 26, 2021, 8:35pm UTC](https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655/2 "2021-01-26T20:35:35Z")

</div>

You should include `kotlin-stdlib.jar` in the classpath for java. It should be in the `lib` directory.  
You can also pass the `-include-runtime` argument to `kotlinc`, this will instruct it to merge the standard library jar in the resulting jar file.

What tutorial do you use by the way? Is it from [kotlinlang.org](http://kotlinlang.org)? Probably it’s out of date and should be actualized.

---

<div class="post-metadata">

**Author:** ![Woland](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@Woland](https://discuss.kotlinlang.org/u/Woland)\
**Post date:** [January 26, 2021, 8:45pm UTC](https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655/3 "2021-01-26T20:45:50Z")

</div>

Thanks for reply - I was following Hadi Hariri’s “Introduction To Kotlin Programming” on O’Reilly’s website. It is very likely somewhat out of date since since it was published in 2016. His IntelliJ examples cannot be followed verbatim either since UI changed.

---

<div class="post-metadata">

**Author:** ![Psijic](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/psijic/32/2227_2.png) [@Psijic](https://discuss.kotlinlang.org/u/Psijic)\
**Post date:** [July 28, 2023, 3:42pm UTC](https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655/4 "2023-07-28T15:42:43Z")

</div>

Sorry, still can’t configure build properly: what should be included where?  
I added extra dependencies:

```auto
dependencies {
    implementation(kotlin("stdlib-jdk8"))
    implementation("org.jetbrains.kotlin:kotlin-stdlib")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-common")

```

And tried different sources:

```auto
    jar {
        manifest.attributes["Main-Class"] = "MainKt"

        duplicatesStrategy = DuplicatesStrategy.INCLUDE
        from("compileKotlin").outputs
// val dependencies = configurations.runtimeClasspath.get().map(::zipTree)
// from(dependencies)
// from(getByName("compileKotlin"))
// from(
// configurations.runtimeClasspath.get().map {
// it.takeIf { it.isDirectory } ?: zipTree(it)
// }
// )

```

And even added a .jar lib into build/libs/kotlin-stdlib-jdk8-1.8.21.jar (but it is deleted after `gradle clean`, so it doesn’t belong there, so I put it into `lib` also).  
And still I have the error:

```auto
java -jar kapp-1.0-SNAPSHOT.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
        at MainKt.main(main.kt)

```

How should I configure my `build.gradle.kts` properly? I use `kotlinOptions.jvmTarget = "17"`

---

<div class="post-metadata">

**Author:** ![Psijic](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/psijic/32/2227_2.png) [@Psijic](https://discuss.kotlinlang.org/u/Psijic)\
**Post date:** [July 28, 2023, 4:33pm UTC](https://discuss.kotlinlang.org/t/kotlin-1-4-21-where-is-kotlin-runtime-jar/20655/5 "2023-07-28T16:33:59Z")

</div>

The current problem became to found the main class, created [another topic](https://discuss.kotlinlang.org/t/kotlin-jar-building-error-could-not-find-or-load-main-class-mainkt/27157)
