See https://www.linuxuprising.com/2018/04/install-oracle-java-10-in-ubuntu-or.html
Or just:
sudo add-apt-repository ppa:linuxuprising/java <enter>
sudo apt update <enter>
sudo apt install oracle-java10-installer <enter>
Then type about:plugins
in the URL box to test.