Install Git using your package manager. For Ubuntu: sudo apt install git, or download from here.
Install OpenJDK: sudo apt install openjdk-17-jdk, or download from here.
Install Maven: sudo apt install maven, or download from here.
To run a JAR file, use the following command:
java -jar yourfile.jar