Ahryman
You have to set an environment variable that points to the jdk folder. You can do this per user, the whole system or per application.
If want to set it per user, go to the home folder of the user and edit .profile:
source /usr/share/defaults/etc/profile
export JAVA_HOME=/opt/java/jdk-15.0.1
export PATH=$PATH:$JAVA_HOME/bin
For terminals you also have to edit .bashrc:
# /usr/share/defaults/etc/profile (you don't need this)
source ./.profile
Log out and in, open a terminal and run:
java -version
You should get something like this (depends on the installed jdk version):
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9-18)
OpenJDK 64-Bit Server VM (build 15.0.1+9-18, mixed mode, sharing)
If want to set it for the whole system, read
/usr/share/defaults/etc/profile
Create a folder profile.d in /etc/
Create a script in this folder, for example javahome.sh
#!/bin/bash
export JAVA_HOME=/opt/java/jdk-15.0.1
export PATH=$PATH:$JAVA_HOME/bin