Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Do you need to switch between versions of Java, back and forth? Or do you just want to use Java 17 only, and dump Java 11? Commented Dec 4, 2021 at 3:33
  • I need to switch between different java versions, because some of my projects are on Java 11 and some of the projects are on Java 17. Commented Dec 4, 2021 at 4:19
  • Java is backward compatible. In other words Java 17 can run code that was compiled with JDK 11. Hence I don't think you need to switch between 11 and 17. Commented Dec 4, 2021 at 6:53
  • I know that. But, the reverse is not possible. i.e. Java 11 can not run Java 17 code. And as I have asked in my question above, my current java version is set to Java 11. So, if I am running any Java 17 project, the compilation fails. Commented Dec 4, 2021 at 19:41