Install Git using Homebrew by running: brew install git. You can also download from here.
Install Java using Homebrew: brew install java. Follow Oracle’s guide for manual installation.
Install Maven using Homebrew: brew install maven, or download from here.
To run a JAR file, use the following command:
java -jar yourfile.jar