/toml-reader

TOML configuration file reader sample for JAVA programs.

Primary LanguageJavaApache License 2.0Apache-2.0

GitHub (pre-)release GitHub (Pre-)Release Date GitHub last commit License

TOML Reader for JAVA

Welcome to the TOML configuration file reader sample.

This sample uses tom4j TOML reader and toml4j is a TOML 0.4.0 parser for Java.

How to run the program

Run following command in the distriution home directory.

$ mvn clean install

After bulding the executables go to target directory

<TOML-READER-HOME>/target/

Run executable with configuration file path

$ java -jar toml-reader-0.1.0.jar --file <PATH-TO-TOML-FILE>

This will show the needed details in the configuration file. This is implemented to exract details from sample configuration file which is about university details as following example.

Example Run

As an example following command will show example TOML file's data. (example TOML file is located at <TOML-READER-HOME>/resources)

$ java -jar toml-reader-0.1.0.jar --file ../resources/university-details.config