One way to have java inside your system is by installing open jdk, when i wrote this article the latest jdk available on xubuntu is open jdk 11, so in this article i will show you how to install open jdk 11 on xubuntu 18.04 bionic.
How to install open jdk 11 on xubuntu 18.04
- open terminal/command line on xubuntu
- run update command
sudo apt-get update
sudo apt-get install openjdk-11-jdk
Xubuntu 18.04 also has open jdk 8, if you prefer open jdk 8, you can install by running this:
sudo apt-get install openjdk-8-jdk
To switch back and forth between different version of java, you can run this:
sudo update-alternatives --config java