When your project depends on external libraries, downloading JAR files manually becomes unmanageable. Build tools automate dependency management, compilation, testing, and packaging.
The most common Java build tools are Maven and Gradle.
Maven uses an XML file called pom.xml to list your dependencies:
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10</version>
</dependency>
Gradle uses a Groovy or Kotlin script called build.gradle:
dependencies {
implementation "com.google.code.gson:gson:2.10"
}
Both tools download libraries automatically from a central repository. Most professional Java projects use one of these tools. You will encounter them in any job or open-source project.