Install JDK in MacOS: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
  /usr/libexec/java_home -V  
  /usr/libexec/java_home -V  
==GraalVM==
<source lang="bash">
sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\
graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz -P /Library/Java/JavaVirtualMachines/
sudo tar -xvzf /Library/Java/JavaVirtualMachines/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz\
-C /Library/Java/JavaVirtualMachines/
sudo rm -rf /Library/Java/JavaVirtualMachines/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz
export GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.0.0.2/Contents/Home
export JAVA_HOME=$GRAALVM_HOME
</source>


==Uninstall==
==Uninstall==

Revision as of 07:44, 11 March 2022

/usr/libexec/java_home -V 

GraalVM

sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\
 graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz -P /Library/Java/JavaVirtualMachines/

sudo tar -xvzf /Library/Java/JavaVirtualMachines/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz\
 -C /Library/Java/JavaVirtualMachines/

sudo rm -rf /Library/Java/JavaVirtualMachines/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz 
export GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.0.0.2/Contents/Home
export JAVA_HOME=$GRAALVM_HOME

Uninstall

/usr/libexec/java_home -v1.8.0_321
/usr/libexec/java_home -v1.8.0_241
/usr/libexec/java_home -v1.7.0_80
/usr/libexec/java_home -v1.8.0
sudo rm -rf /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/

References