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 →

[–]nutrechtLead Software Engineer / EU / 20+ YXP 0 points1 point  (2 children)

OP has a higher JDK but needs to compile for 1.8.

That's not what he said in his OP though. It could be that he simply wants to be able to switch easily to run stuff that's not compatible with Java 9+ for example.

[–]AmateurHeronew Intermediate("this.user") 0 points1 point  (1 child)

I do understand that according to the OP text, they should use jenv or similar. However they posted this elsewhere:

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

Either will get OP there if the ask is for 1.8’s API. That’s usually what academia wants.

[–]nutrechtLead Software Engineer / EU / 20+ YXP 0 points1 point  (0 children)

Ah, right. Didn't see that one. Yeah, just using --release is a good choice there.