I'm new to java. Need to use log4j in the project. I have added the class path for both core and api files of log4j. But when i try to import the file into my project, i'm getting an error saying "The type org.apache.logging.log4j.Logger is not accessible".I Need your help to fix this issue.
Since i'm new to development and IDE. I'm not sure about how to check the IDE settings.
You chose a steep slope to learn Java: you have a module-info.java
module descriptor in it. The Java Platform Module System was introduced in Java 9 (cf. tutorial), but is far from being widespread.
You have two solutions:
module-info.java
file from your project,requires org.apache.logging.log4j;
to your module-info.java
file (which is the log4j-api
module, the log4j-core
module is runtime-only and you shouldn't access it in code).