Ran into something unfortunate… I’ve transferred m...
# scripting
a
Ran into something unfortunate… I’ve transferred my TornadoFX project to use OpenJDK11 and OpenJFX, but upon starting the KotlinCoreEnvironment for PSI parsing, it appears that it is also trying to read the openJDK modules… it seems to care about the JDK modules being used in my project but I’m not sure if it’s trying to read the modules in my VM settings or what
l
I think it's caused by Kotlin script not using JDK 11 by default. Searching on youtrack.jetbrains.com should give some results about possible workarounds as I remember about a recent issue for jvmTarget of .kts files
n
kotlin scripting itself is currently unable to accept compiler args or the like originally 1.6 was the default, because it kept breaking inline lambdas it was changed to 1.8, no idea when this will be fixed hopefully in 1.3.40
💯 1
a
Alright, I tried targeting the projects down to 1.8 in the compilier. No luck, but it does look like Ilya suggests moving Kotlin down to 1.3.2
l
@amanda.hinchman-dominguez With SDKMAN, you can switch between Kotlin versions with one command.
a
Oh that's cool, send me a link?
l
SDKMAN is mentioned here: https://kotlinlang.org/docs/tutorials/command-line.html#downloading-the-compiler The commands to install multiple versions and switch between them are the same as for JDK or other SDKs, you can find them on SDKMAN website or in the terminal `man`(ual) entry too I think.
n
but isn't that why we use gradle in the first place ?
l
That doesn't apply to kotlin scripts and JDKs installations (except for the JDK used to compile against)
n
what i do is have gradle export the path to the currently used jdk and either bake it into the program or some properties file