First you have to make the JRE and JDK available by the command
module add java/oracle
Afterwards you can use the JRE and JDK in that terminal window.