Removed Java 18 to replace with 17 but still 18 when run.

Owen Thomas owen.paul.thomas at gmail.com
Wed Nov 23 02:45:50 UTC 2022


My Java project, which uses Gradle 7.4, told me that this version of Gradle
is incompatible with Java 18. I had a look here
<https://docs.gradle.org/current/userguide/compatibility.html> and was
advised to use Java 17. So, I tried to remove Java 18 using "sudo apt
remove openjdk-18-jdk" followed by "sudo apt install openjdk-17-jdk". When
I run java --version I get the following result:

openjdk 18.0.2-ea 2022-07-19
OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode,
sharing)

I have tried to run this in a fresh CLI window, and the results are the
same,

What do I do now?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20221123/83304e6f/attachment.html>


More information about the ubuntu-users mailing list