NovaVibe

error: package org.slf4j does not exist

I'm making an attempt to create a program in Java the use of Netbeans. I am making an attempt to make use of org.slf4j. I believe I have positioned the sufficient quantity of slf4j jar files in my CLASS PATH. I've positioned slf4j-api, slf4j-jcl, slf4j-jdk14, slf4j-nop and slf4j-simple in my elegance trail.

My query is: Am i placing the unsuitable jar information in my class path, the Zip report for the slf4j folder incorporated a considerable amount of jar files. Why are there so many executable jar information incorporated for SLF4J.

Ultimately, the program wishes to match 2 pdf information at a time and spit out an error message if the information are different. Would somebody know if there may be anything out there that I will be able to come with so I do not have to take care of this SLF4J package. Below is where I'm making an attempt to run the package.

import org.slf4j.Logger;

import org.slf4j.LoggerManufacturing unit;

5

3 Answers

Set Dependencies as follows.

In Maven

<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>version number</version> </dependency> 

In Gradle

dependencies  collect team: 'org.slf4j', name: 'slf4j-api', version: 'version number'  
4

In Gradle upload the following dependencies:

implementation 'org.slf4j:slf4j-api:1.7.28' implementation 'org.slf4j:slf4j-simple:1.7.28' 

The remaining one dependency must be added to Resolve "Failed to load class org.slf4j.impl.StaticLoggerBinder"

In construct.gladle ( the second one ) take a look at dependencies and add this line:

dependencies  ... implementation 'org.apache.listing.studio:org.slf4j.api:1.7.2'  

ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJoa3FqYWl%2Fen2Onqmrp6JivaKvypqenmWfp7Ruv8ufa6NllKSytHnNqKtmnaiewLU%3D

Beatrice Clogston

Update: 2024-06-08