scala-cli
scala-cli copied to clipboard
Packaged apps should pick java from the path
Is your feature request related to a problem? Please describe.
scala-cli is used to generate a default-packaged application using Java 17. On a machine with two Java (/usr/bin/java
(11) and /usr/local/bin/java
(17)), the application won't start because the bash script that launches it will use /usr/bin/java
.
Describe the solution you'd like
The launching script should use /usr/local/bin/java
, which is first in path.
Describe alternatives you've considered
The alternative is to generate a jar and use java
explicitly to start it.
Additional context
The documentation ("Their only requirement is that the java command needs to be available in the PATH.
") would seem to suggest that the first java
in the path be used.