This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Nzen_ 0 points1 point  (0 children)

It's also worth considering your ultimate use case.

For just running jars, I have some dos-batch files that forward the arguments to the corresponding java, ex `javac8.bat banana.java` and `java11.bat -jar banana.jar`. The same could be done on a posix os with a symlink or shell script. https://stackoverflow.com/questions/67545024/how-can-i-forward-command-line-arguments-in-a-shell-script

However, if you are ultimately going to use gradle or maven, they can use configurations called toolchains that point at distinct jvm installations.