1、参考

https://blog.csdn.net/gaofenglxx/article/details/102565883

安装好JDK6

2、参考

https://www.graalvm.org/docs/getting-started/

Note on macOS java_home command

The information property file, Info.plist, is in the top level Contents folder. This means that GraalVM participates in the macOS specific /usr/libexec/java_home mechanism. Depending on other JDK 8 installation(s) available, it is now possible that /usr/libexec/java_home -v1.8 returns /Library/Java/JavaVirtualMachines/graalvm-ee-19.2.1/Contents/Home. You can run /usr/libexec/java_home -v1.8 -V to see the complete list of 1.8 JVMs available to the java_home command. This command appears to sort the JVMs in decreasing version order and chooses the top one as the default for the specified version. Within a specific version, the sort order appears to be stable but is unspecified.

一开始我没在意这段话,后来傻逼了,学乖了,把这个graalvm直接扔到指定目录,然后修改好PATH和JAVA_HOME到指定目录去;

安静了

3、验证一下

Last login: Fri Oct 25 22:19:18 on ttys001

lemonhall@yunings-Mac-mini ~ % /usr/libexec/java_home -v1.8

/Library/Java/JavaVirtualMachines/graalvm-ee-19.2.0.1/Contents/Home

lemonhall@yunings-Mac-mini ~ % java -version

java version "1.8.0_221"

Java(TM) SE Runtime Environment (build 1.8.0_221-b11)

Java HotSpot(TM) 64-Bit GraalVM EE 19.2.0.1 (build 25.221-b11-jvmci-19.2-b02, mixed mode)

lemonhall@yunings-Mac-mini ~ %