Apologies for the cross post, but perhaps people h...
# scripting
r
Apologies for the cross post, but perhaps people here have more experience of this?
👀 1
v
Works fine here:
l
I am seeing the same issue at the moment. IntelliJ IDEA 2025.1.1.1 (Ultimate Edition) Build #IU-251.25410.129, built on May 9, 2025 Source revision: b815cfdcaa594 Runtime version: 21.0.6+9-b895.109 aarch64 (JCEF 122.1.9) VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.lwawt.macosx.LWCToolkit macOS 15.5 Kotlin plugin: K2 mode GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 8096M Cores: 16 Metal Rendering is ON Kotlin: 251.25410.129-IJ
v
Hi, is it happening only in .main.kts? Or in the kotlin sources as well?
r
Only in .main.kts. The .main.kts file isn’t in a source directory
l
Same for me
r
What's particularly frustrating is I'm not being offered any obvious way to set the classpath to use a particular JDK.
v
there is a thing you can try go to
Registry
and set
kotlin.k2.scripting.show.modules
to
true
then go to modules structure (Project Settings > Modules) dialogue and fins there
kotlin.scripts.MainKtsScript....
something
there will be dependencies and a sdk
r
OK, thanks, I'll give that a go
v
unfortunately it's not very convenient and we are gonna change it in idea 25.2
👍 1