Setting up your development environment for JAVA with Maven — Linux Edition
In this blog post, I will walk you through configuring your development machine for JAVA development using Apache Maven on Linux.
By the end of this guide, you will be able to start working on JAVA projects with Apache Maven on Linux.
If you are running Windows or macOS, please see the following posts regarding those Operating Systems:
Windows Edition
macOS Edition
Also see this article for the Hardware Requirements, and Prerequisites:
Setting up your development environment for JAVA with Maven
Software Installation
JetBrains IntelliJ
Download and extract the .tar.zg file and run
JAVA
Open the installer file and the file will start to extract the required files onto the machine
Read the instructions and click on Next
Verify or Modify the installation path of JAVA and click Next
Installation starting
Updating the components of the installer
Installer copying files over to machine
Installation complete. Click on Close
Apache Maven
Ensure JAVA_HOME is set by running the following command in your terminal
echo %JAVA_HOME%
Download the binary zip archive from the publisher’s website
https://maven.apache.org/download.cgi
Switch to the Maven contents
mv Downloads/apache-maven* /opt/apache-maven
Add Maven binaries to the PATH and append
export PATH=/opt/apache-maven-3.9.6/bin:$PATH
Software Verification
JAVA
To verify the Java JDK is properly installed, from your command line run the following command:
java -version
This command verifies the Java (java) is installed. If java is not found, check your Java installation.
JAVA JDK
To verify the Java JDK is properly installed, from your command line run the following command:
javac -version
This command verifies the Java complier (javac) is installed. If javac is not found, check your Java JDK installation.
Maven will not function without a properly installed.
Apache Maven
To verify the Apache Maven is properly installed, from your command line run the following command:
mvn -v
or
mvn -version
This command verifies Apache Maven is installed. If Maven is not found, check your Maven User Variables