You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a library that is compiled for Java 11. When running Scala-cli scripts, I need the JVM version to be at least 11, but the current directive //> using jvm 11 causes Java 11 to be downloaded and used, even if the system already has a newer JVM version (e.g., Java 21) installed. This is undesirable, as I would prefer to use the newer JVM when available.
Describe the solution you'd like
I would like to be able to specify a minimum JVM version for my script. This would allow the script to run on any JVM that meets or exceeds the required version without forcing the download of an older JVM.
Proposed syntax:
//>usingjvm11+
Or:
//>usingjvm>=11
Describe alternatives you've considered
Using the existing directive //> using jvm 11 . However, this causes Java 11 to be downloaded, even when a newer version is already installed.
Not using any directive at all. This approach results in an error when the script is executed, as the JVM may not meet the minimum version requirements and produces cryptic errors about class file versions. To diagnose the error, the user is forced to make a research about which JVM version corresponds to which class file version (e.g. Java 11 <-> class file format v55).
Additional context
This feature would make it easier to work with projects requiring specific Java versions, without unnecessary downloads of older JVM versions when a suitable newer version is already installed.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have a library that is compiled for Java 11. When running Scala-cli scripts, I need the JVM version to be at least 11, but the current directive
//> using jvm 11
causes Java 11 to be downloaded and used, even if the system already has a newer JVM version (e.g., Java 21) installed. This is undesirable, as I would prefer to use the newer JVM when available.Describe the solution you'd like
I would like to be able to specify a minimum JVM version for my script. This would allow the script to run on any JVM that meets or exceeds the required version without forcing the download of an older JVM.
Proposed syntax:
//> using jvm 11+
Or:
//> using jvm >= 11
Describe alternatives you've considered
Using the existing directive
//> using jvm 11
. However, this causes Java 11 to be downloaded, even when a newer version is already installed.Not using any directive at all. This approach results in an error when the script is executed, as the JVM may not meet the minimum version requirements and produces cryptic errors about class file versions. To diagnose the error, the user is forced to make a research about which JVM version corresponds to which class file version (e.g. Java 11 <-> class file format v55).
Additional context
This feature would make it easier to work with projects requiring specific Java versions, without unnecessary downloads of older JVM versions when a suitable newer version is already installed.
The text was updated successfully, but these errors were encountered: