All Downloads are FREE. Search and download functionalities are using the official Maven repository.

k.logback-site.0.9.8.source-code.setup.html Maven / Gradle / Ivy





Setup



	


Classpath Setup

In order to run the examples provided in the documentation, you need to add the following jars to your class path:

    logback-core-${version}.jar

    logback-classic-${version}.jar

    logback-examples-${version}.jar

    slf4j-api-${slf4j.version}.jar

Example

Assuming your current directory is $LOGBACK_HOME/logback-examples, where $LOGBACK_HOME stands for the directory where you installed logback, you can launch the first sample application, chapter1.HelloWord1 with the following command:

java -cp
 lib/slf4j-api-${slf4j.version}.jar;../logback-core-${version}.jar;\
 ../logback-classic-${version}.jar;logback-examples-${version}.jar\
 chapter1.HelloWorld1

It is more convenient to set the CLASSPATH environment variable once and for all before running the examples.

The setClasspath.cmd script located in the $LOGBACK_HOME/logback-examples folder will configure the class path for the MS Windows platform. For Unix, you can use setClasspath.sh.

Please edit the script in order to adapt the LB_HOME variable to match your local environment.

Please be aware that many examples will launch java classes along with configuration files. To access these files by using the same commands as written in the documentation, you will need to issue the commands from within the $LOGBACK_HOME/logback-examples directory.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy