Introduction
In this section, I introduce some small Java projects
Rabbits vs Hunter
Source : GitHub repository
Goal
This projects manages a rabbit hunt. It's possible to change some criteria such as trees, burrows and rabbits counts.
Building
Using maven, just execute the following command :
mvn clean package
In the new target folder, you will find the rabbits-vs-hunter-[version]-jar-with-dependencies.jar jar file. This jar contains all dependencies.
Running
Execute the built jar :
java -jar rabbits-vs-hunter-[version]-jar-with-dependencies.jar
Word lister
Source : GitHub repository
Goal
This project prints all words in a file, one per line. All compound words and numbers are preserved (such as byte-input and -5.52% for example).
Building
Using maven, just execute the following command :
mvn clean package
In the new target folder, you will find the word-lister-[version]-jar-with-dependencies.jar jar file. This jar contains all dependencies.
Running
Execute the built jar with the --help parameter to display the help message. To parse a file, execute the following command :
java -jar word-lister-[version]-jar-with-dependencies.jar <path_to_a_file>