Removed Java 18 to replace with 17 but still 18 when run.
Owen Thomas
owen.paul.thomas at gmail.com
Wed Nov 23 04:16:38 UTC 2022
Thanks Jeffrey that works. Running java --version now gives me the
following:
openjdk 17.0.5 2022-10-18
OpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu122.04, mixed mode,
sharing)
I did check "which java" I had installed before I installed the OpenJDK 18
package, and nothing was returned. I would have thought that removing the
OpenJDK 18 package would have removed what was installed, but evidently not.
Removing these packages should have been a simple exercise. It was not. I
have had more memorable days as a result.
On Wed, 23 Nov 2022 at 14:49, Jeffrey Walton <noloader at gmail.com> wrote:
> On Tue, Nov 22, 2022 at 9:47 PM Owen Thomas <owen.paul.thomas at gmail.com>
> wrote:
> >
> > 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 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?
>
> It looks like you still have the Java Runtime Environment (JRE)
> installed. You should remove it, too.
>
> The package name could be openjdk-18-jre, openjdk-18-jre-headless or
> openjdk-18-jre-zero. So your command might look like:
>
> $ sudo apt-get remove --purge \
> openjdk-18-jre \
> openjdk-18-jre-headless \
> openjdk-18-jre-zero
>
> This may help identify other interesting OpenJDK 18 packages:
>
> $ apt-cache search '^openjdk*' | grep '\-18'
>
> Jeff
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20221123/ba159b65/attachment.html>
More information about the ubuntu-users
mailing list