Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 19, 2022 09:25 pm GMT

HOW TO CREATE A JAR FILE ON A SPRING/MAVEN PROJECT

A jar file is in fact a server-runnable code.
On terminal execute this command:
mvn package
This command will build the project, run the tests and create a jar file. So be sure that all tests are passing.

After that, check the target folder, jar file will be there.

Image description

Now it is time to run this jar file. Command:
java -jar <name>.jar
With this command, the application will be running on the specified localhost port (default 8080). You can test it.

Happy coding with no errors!


Original Link: https://dev.to/caglarcercinli1/how-to-create-a-jar-file-on-a-springmaven-project-iba

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To