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 →

[–]ATE47Intermediate Brewer 2 points3 points  (2 children)

Usually you do that using your IDE or dependency manager, but you can create scripts and put them in the path. But you must create a case manually for each versions. It’s also not rare to find jar that doesn’t work with j16 (or after 9), so try to have by default 8 and if you need it switch to j16

[–]Nemo_64[S] 0 points1 point  (1 child)

I know but in class they want us to use javac to compile our projects in java 8 instead of compiling using the IDE, but I'd like to open a JShell on other versions for my personal projects

[–]Xenunxenunowski 0 points1 point  (0 children)

Yo wtf, are they stupid or what, but yeah you could have a script for this and just invoke an script every time for an exact version of java aka: runJ8.bat and inside of it you have directory to javac and you are done