You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java version "14.0.1" 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
The text was updated successfully, but these errors were encountered:
本文中开发环境都以MacOS为准
JDK是Java Development Kit的缩写。
还有另一个常见的术语叫JRE,它是Java Runtime Environment的缩写,包含虚拟机但不包含编译器,这并不是我们开发者想要的环境,而是专门为不需要编译器的用户提供的。所以我们只需要下载JDK即可。
从https://www.oracle.com/cn/java/technologies/javase-downloads.html网站上下载JDK。
安装完之后,MacOS会安装到
/Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home
这个目录下,会自动设置环境变量,如果有的环境是Linux的,可以自己设置一下环境变量。设置完之后,执行
java -version
,看到类似如下的内容,表示设置成功。The text was updated successfully, but these errors were encountered: