How to install Java jdk, Maven, and intelleJ in under 120 seconds

Today I wanna show you, how to install JAVA jdk, Apache Maven, and intelliJ IDEA in under 120 seconds using Homebrew. It’s super easy, mate!

When you think of creating a java program, the first thing you do is prepare a jdk installation and for me maven is a must, and intelliJ is a complement as an editor. So here we go!

First, you need to install a Homebrew, you can go to the Homebrew homepage or go to the terminal by typing  the following command below, and your first Homebrew will be deliver on a seconds.

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

After succeed install Homebrew, the next step is check java jdk with Homebrew, and please type this command below on your terminal.

$ brew cask java

It’s show you that jdk version, what good to install. So back on your terminal and type:

$ brew install java

So, this will go we download everything, install the JRE it will installed the source code for the JDK and make everything lot of easier. Brew is the fastest way I knew of getting the Mac up to speed ready for development.

Make sure you already type javac -c to verify thst java jdk has been installed properly, let’s going to the next step to install Apache Maven. Simply doing like install java before, you should go on terminal and then type:

$ brew info maven

$ brew install maven

Type mvn -version to verify Apache Maven has been installed properly on your machine. To make sure the application has been running well, we can check by compiling a java program.

So, in this case I downloaded JavaJUnit-master from git repository, you can click here to download a zip file.

Back to terminal and access location of JavaJUnit-master, for example (cd Downloads/), and type:

$ mvn test

If you have installed correctly of Java jdk anda Apache maven, this should work and run the unit test are in that project. Wait until all dependency has been downloaded, see the picture below if your test has been worked.

So, now we have java jdk, Apache maven, and it’s time to install intelliJ, so brew has a search command

$ brew search intellij



It will tell us that we can install the IntelliJ IDEA or intelliJ IDEA CE. The inteliJ IDEA CE is the Community Edition and it’s absolutely free to use. All we need to do is type:

$ brew install intellij-idea-ce

Now we have java jdk, Apache Maven, and IntelliJ. We’re ready to running the code. Can you imagine how a simple this step? I loved this way.