Development environment

  1. JDK 1.8 Downloads
  2. Eclipse Mars Download

Required jar files

  1. slf4j-api-1.7.13.jar
  2. slf4j-simple-1.7.13.jar

Maven dependencies

In order to run the example; simply follow steps below:

Step 1 Create Java Project

Launch Eclipse IDE; Create new Java Project by going to File -> New -> Others… -> Java Project. Choose any project name you want then click Finish.

Step 2 Create Java Class

Copy the code below to clipboard; Select src folder in your project; Press CTRL + V; Eclipse IDE will automatically create package & class file with the code that’s pasted from clipboard.

Step 3 Configure Build Path…

  1. Download the slf4j distribution; and then to unpack it.
  2. Create lib folder by right click to the project select New -> Folder. Copy slf4j-api-1.7.13.jar and slf4j-simple-1.7.13.jar from the unpacked folder; and paste to the lib folder.
  3. Right click to the project; select Build Path -> Configure Build Path… Select Libraries tab; click Add Jars… Select the 2 above files then click Ok.  Click Ok to finish the configuration.

Step 4 Run the application

Right click to the class; select Run As -> Java Application.