54
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

新しいmacにbrewを使ってjavaとmavenをインストールする

Last updated at Posted at 2017-05-24

macを新調したので、javaの環境を整えた時のメモ。macに馴れ親しむことも目的に、brewを使ってインストール。

brew

https://brew.sh/index_ja.html にある通り。Xcode Command Line Toolsも同時にインストールできる。

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew -v
Homebrew 1.2.1

java

caskを使って最新のバージョンのjavaがインストール。現時点だとjava8。特にこだわりはないのでそのまま。その後環境変数なども設定。

$ brew cask install java
$ java -version
java version "1.8.0_131"
$ javac -version
javac 1.8.0_131

参考
http://qiita.com/yanap/items/186d5bd1118f68f725d8
http://qiita.com/yu-iskw/items/79d9bddb77efaf2ca255

maven

以下のコマンドで最新のmavenをインストール。

$ brew install maven
$ mvn -v
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T04:39:06+09:00)

参考
http://qiita.com/hoisjp/items/d5fd6d96235e2f2fdedb

以上

54
45
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
54
45

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?