Is your feature request related to a problem? Please describe.
I'm always frustrated when I get java 11 when I omit a //JAVA directive.
Describe the solution you'd like
I want jbang to leave the project's jdk version alone when the script has no //JAVA directive... or let me set a different version to default to.
Describe alternatives you've considered
Currently I delete all jdks that are not 25 out of IntelliJ so it has no choice but to use my 25 jdk. I could also set a //JAVA version but I don't want to.
Additional context
|
val javaVersion = if (javaSdkVersion != null) { |
|
(19 downTo 9).firstOrNull { javaSdkVersion.contains("${it}.0") } ?: 8 |
|
} else { |
|
11 |
|
} |
Is your feature request related to a problem? Please describe.
I'm always frustrated when I get java 11 when I omit a //JAVA directive.
Describe the solution you'd like
I want jbang to leave the project's jdk version alone when the script has no //JAVA directive... or let me set a different version to default to.
Describe alternatives you've considered
Currently I delete all jdks that are not 25 out of IntelliJ so it has no choice but to use my 25 jdk. I could also set a //JAVA version but I don't want to.
Additional context
jbang-idea/src/main/kotlin/dev/jbang/idea/module/JBangModuleBuilder.kt
Lines 40 to 44 in 5a6afec