Install Java on Mac

install brew

brew is one of Mac's package management systems. You can install various software with one command, Easy to upgrade and uninstall

Terminal.app


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

install java

Install java8 immediately using brew

Terminal.app


%> brew install Caskroom/cask/java

Install jenv

jenv is software that can manage multiple java versions Put it in for the time being

Terminal.app


%> echo -e 'if which jenv > /dev/null; then \n   export JENV_ROOT=/usr/local/var/jenv \n  eval "$(jenv init -)" \nfi' >> ~/.bashrc

%> source ~/.bashrc

Specify the default java to use on the system with jenv

You can see all the java currently installed with jenv versions. Java, which is installed by default on Mac, is used.

Terminal.app


%> jenv versions
* system
  1.8
  1.8.0.112 
  oracle64-1.8.0.112

Changed java used in system to 1.8.0.112

Terminal.app


%> jenv global 1.8.0.112

Verification!

Terminal.app


%> jenv versions
  system
  1.8
* 1.8.0.112 
  oracle64-1.8.0.112

install eclipse

Include an integrated development environment that is essential for java development

Terminal.app


brew cask install eclipse-jee

This is the end for the time being. Tired

Recommended Posts

Install Java on Mac
Install Java development environment on Mac
Install gradle on mac
Install openjdk11 on mac
Install OpenJDK 8 on mac
Install java and android-sdk on Mac using homebrew
Install OpenJDK7 (JAVA) on ubuntu 14.04
Install Java on WSL Ubuntu 18.04
Install tomcat + eclipse on mac
Install java 1.8.0 on Amazon linux2
Install java and maven using brew on new mac
Install Java with zip on Windows
Install Java Open JDK 8 on CentOS 7
Install Java 9 on windows 10 and CentOS 7
How to check Java installed on Mac
If you can't install java on Catalina
Java development environment construction memo on Mac
Install OpenJDK (Java) on the latest Ubuntu
How to install Eclipse (Photon) on Mac
I can't install rails on my mac
How to switch Java versions on Mac
Build a Java development environment on Mac
Install Java8 with Yum on Amazon Linux
Hello World on Mac VS Code Java
Download and install Eclipse (Java) (Mac version)
[Mac] Install Java in Visual Studio Code
Install java with Homebrew
Let's touch on Java
Install Corretto 8 on Windows
Run STS4 on Mac
Install OpenJDK on macOS
I tried putting Java on my Mac easily
Put Java 11 and spring tool suite on mac
Install Java with Ansible
[Java] Install Amazon Corretto 8
Install Golang on CentOS 8
Install pyqt5 on ubuntu
Install Neo4j 4.1.3 on centOS
Install Java 11 (OpenJDK: AdoptOpenJDK) on macOS with Homebrew
Mac Java Home Directory
Run PostgreSQL on Java
Install Docker on Manjaro
Install Vertica 10.0 on CentOS 6.10
Install Ruby on Ubuntu 20.04
Install Ruby / Rails on Mac M1 Big Sur 2021-01
Install Java 14 (OpenJDK: AdoptOpenJDK) on macOS with Homebrew
Mac Rails Install Error
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install lombok on SpringToolSuite4
Install SonarQube on Mac and challenge source analysis
Install Python 3 on CentOS 7
Install Java 8 (OpenJDK: AdoptOpenJDK) on macOS with Homebrew
Install kuromoji on CentOS7
Switch between multiple versions of Java on Mac
Install Autoware on Ubuntu 18.04.5
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install Java, Apache, Tomcat9 on EC2 (Amazon Linux2)
Install jpndistrict on CentOS 7
Install Homebrew on Ubuntu 20.04