hi, I'm new to kotlin, on Debian bookworm, I insta...
# getting-started
h
hi, I'm new to kotlin, on Debian bookworm, I installed kotlin by download from github release page and extract zip file, and run kotlinc to build MainKt.class and run it successfully,
Copy code
import java.math.BigInteger

fun pe16(): Int {
    val p: BigInteger = 2.toBigInteger().pow(1000)
    return p.toString()
            .chars()
            .map({ it - '0'.toInt() })
            .sum()
}

fun main() {
    println("digits sum 2**1000 is ${pe16()}".toUpperCase())
}
I see no existance of JDK since I didn't installed it (not JRE). So that seems kotlin does not require JDK? (I searched online but found only this https://discuss.kotlinlang.org/t/does-the-kotlin-compiler-require-a-jdk/2496 and it says "You need JDK", and this also says similar https://www.sololearn.com/en/Discuss/2073812/why-does-kotlin-need-a-jdk-when-it-has-its-own-compiler)
c
kotlinc
does not require a JDK, AFAIK A JRE is required
If you only use Kotlin Scripting etc, you can even get by with only a headless JRE
h
thanks, Yes Im using jre-headless
c