ringa_lee2017-04-17 13:56:39
It is recommended to install with brew case
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap phinze/homebrew-cask
brew install brew-cask
brew cask search java
brew cask install java//替换成搜索到的结果
If you don’t want to use this type of package manager, type java in the terminal, and an automatic installation prompt will pop up. Of course, it is recommended to use homebrew and brew case to facilitate management of osx software and applications
伊谢尔伦2017-04-17 13:56:39
Don’t try to trick newbies, okay?
Now mac does not come with jdk, you need to install it yourself
Someone else liked it, so I will help to the end.
The latest jdk is 1.8. It is recommended to download it from the Oracle official website. I disliked the slow speed and lost a Baidu disk. Link: http://pan.baidu.com/s/1o6sXgdO. Just download and install it directly.
In addition, if it involves jdk multi-version environment variable management, it is recommended to use jenv. The installation method can be found on Google. Thank you.
Very convenient.
Like it like crazy, you cool guys.
阿神2017-04-17 13:56:39
I brought it, but the one I brought with me is not easy to use, so I usually install a new one
阿神2017-04-17 13:56:39
If it comes with it, you can open the console and enter: java -version to check the version number. You can also install the JDK yourself and configure the environment variables.
大家讲道理2017-04-17 13:56:39
I installed it myself jdk8
. It is recommended to go to the oracle
official website to download the mac version jdk
, which is relatively simple.
阿神2017-04-17 13:56:39
It is recommended to install it yourself, I installed it myself, it is not difficult!
阿神2017-04-17 13:56:39
I just bought a macbook pro yesterday. After I installed it at home webstorm
, I was prompted to install jdk
~~
高洛峰2017-04-17 13:56:39
The mac air I bought in 2014 did not come with jdk. Need to install it yourself.
阿神2017-04-17 13:56:39
Macs no longer come with jdk, but the ones that came with it many years ago
However, when you need to use it, your mac will prompt you. Then click on more information to enter Apple’s official website to download
The version on Apple's official website is not the latest java version. If you want to download it, you can go to the java official website to download
天蓬老师2017-04-17 13:56:39
To check whether java is installed, you only need to enter the java -version
command in the terminal. If the corresponding version information appears, such as mine below, it means it exists. If not, it means it does not exist.
bash
Java version "1.7.0_60-ea" Java(TM) SE Runtime Environment (build 1.7.0_60-ea-b15) Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
does not exist or you want to install a higher version. The easiest way is to download the dmg file of jdk on mac and double-click to install it. jdk7 download address: https://jdk7.java.net/download.html, jdk8 download address: https://jdk8.java.net/download.html
For detailed process, please refer to: http://ixirong.com/2015/03/19/the-beginner-of-mac/