Hi all, I am currently trying to run a Kotlin Note...
# datascience
a
Hi all, I am currently trying to run a Kotlin Notebook within Intellij with a JDK 20. Under Settings->Tools->Kotlin Notebook->JVM and Build, there is JDK Path. However, if I try to set it to a JDK 20, it is never accepted. Does anybody know if JDK 20 is supported for Kotlin Notebooks. Thx Adrian
i
Hi Adrian. Unfortunately it's not supported. The reason is removal of
Thread.stop
method (it throws UOE since Java 19): we use it to interrupt code execution. Without it, we're not able to interrupt the code containing infinite loop. for example. I hope in the future we'll find a solution for it (injecting
isInterrupted
checks when compiling the user code, for example)
đź‘€ 1
a
Thx for the quick response!
p
Didn’t realize this, this is a major downside. Wouldn’t it be possible to support 19 and higher and make it a responsibility of the client code used to check if interrupted was called (so no auto insertion of these checks). For example for my roboquant framework, there is a logical place to put this check. And I expect that is the case for many long running tasks. At least some newer jdk features would be available.
i
We will discuss it with the team. Thank you for the feedback!
👍 1