Whenever I decide to get back into programming after a longer break, I often find myself wondering how to set up the tools again. What has changed since last time? Does everything still install the same way as it used to?
This is the third post on this topic — the first one was written back in 2009 and can be found here, while the second one came out in 2019 and is available here. Let’s see what has changed since then.
Our goal remains the same — to build applications in Java. And we want to quickly set up all the essential tools we’ll need for that:
- Java JDK
- IDE
- Git
- Maven
Installing Java
Step 4: Verify Java installation by opening command line and type java -version and javac -version. You should see informationa about Java installed:
Installing IDE
Step 2: Download and install application named JetBrains Toolbox from here. If you have a JetBrains account, sign in to it from within the installed application — this way, if you already own a license for any of the tools, everything will activate automatically without any extra steps.
Installing GIT
Open command prompt and execute command git --version to see if git responds. After that configure user and email by typing commands (replace XYZ with Your value):
git config --global user.name "XYZ"
git config --global user.email "XYZ"
Installing Maven
Step 1: Create directory C:\Development\Maven. Then download Maven (binary zip archive) from here and unpack it to the created directory.
Step 2: Create directory C:\Development\Maven\repository for artifacts downloaded by Maven:
Step 3: Tell Maven to use created above directory as a repository. Locate Maven settings file named settings.xml and add a line inside:
Step 4: Add Maven's bin folder to the system PATH variable in order to use maven commands from console.
Step 5: Verify if Maven is installed correctly. Open command line and execute command: mvn --version. You should see similar information:
Hello World in Java using above tools
Next, we need to add our project to a local Git repository. We do this by running the git init command in the project’s source directory. There are two ways to do it:
- Open the project folder in Windows Explorer, right-click inside it, and choose "Open Git Bash here" or
- Run the same command directly from the IntelliJ terminal.
Let’s go with the second option — but first, let’s make sure IntelliJ uses Git Bash as its default terminal instead of the standard Windows one (cmd.exe). Open settings again and find settings for Terminal:
After apply just open the terminal and run git init command there:
That all. Project is fully set up and saved in local Git repository.