📝 Edit page
➕ Add page
Java runtime
Setup and run the Java runtime to compile and run JVM code
Install
macOS
See Install page.
brew install openjdk
Configure
If you have trouble running, do these steps.
macoS
sudo ln -sfn $(brew --prefix)/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
Add to shell config if needed:
export JAVA_HOME=$(/usr/libexec/java_home)
Run
java -jar hello.jar