Linux ((new)) | Jre

source ~/.bashrc curl -s "https://get.sdkman.io" | bash sdk install java 17.0.9-tem sdk use java 17.0.9-tem 8. Setting JAVA_HOME Correctly Even if you only need the JRE, many applications check JAVA_HOME . Point it to the JRE installation directory.

java -version Example output (OpenJDK 11): jre linux

Compile on a machine with JDK (or use online compiler), then run on target Linux with JRE: source ~/

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export PATH=$JAVA_HOME/bin:$PATH Then reload: jre linux