A minimal Java 21 project template for basic Java exercises and learning.
This project follows the standard Maven directory layout:
java-basics-template/
├── pom.xml # Maven configuration
├── README.md # This file
└── src/
├── main/
│ └── java/
│ └── nl/
│ └── learninablitz/
│ └── JavaBasicsApplication.java
└── test/
└── java/
└── nl/
└── learninablitz/
└── JavaBasicsApplicationTest.java
- Java 21 or higher
- Maven 3.6 or higher
Make sure you have Java 21 and Maven installed:
java -version
mvn -version-
Compile the project:
mvn compile
-
Run the main application:
mvn exec:java -Dexec.mainClass="nl.learninablitz.JavaBasicsApplication"
Run all tests:
mvn testCreate a JAR file:
mvn packageThis is a template repository. The main class and test class contain minimal starter code with TODO comments where you should add your implementation.
This template provides a foundation for:
- Basic Java syntax and features
- Unit testing with JUnit 5
- Maven project structure
- Clean code practices