brew install openjdk
<p>brew install openjdk</p>
<p>echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> /Users/jony/.bash_profile</p>
<p>echo 'export PATH="/opt/homebrew/Cellar/maven/3.9.9/bin:$PATH"' >> /Users/jony/.bash_profile</p>
<p>echo 'export JAVA_HOME="/opt/homebrew/opt/openjdk"' >> /Users/jony/.bash_profile
export JAVA_HOME=/path/to/java</p>