Contents
How do I reinstall Java on Ubuntu?
Installing the Default OpenJDK (Java 11)
- First, update the apt package index with: sudo apt update.
- Once the package index is updated install the default Java OpenJDK package with: sudo apt install default-jdk.
- Verify the installation, by running the following command which will print the Java version: java -version.
24 февр. 2020 г.
How do I uninstall Java on Ubuntu?
8 Answers
- Remove all the Java related packages (Sun, Oracle, OpenJDK, IcedTea plugins, GIJ): dpkg-query -W -f=’${binary:Package}n’ | grep -E -e ‘^(ia32-)?( …
- Purge config files (careful. …
- Remove Java config and cache directory: sudo bash -c ‘ls -d /home/*/.java’ | xargs sudo rm -rf.
2 дек. 2011 г.