I have installed and have running log4j2 on Windows 10. I am attempting to
get it running on Ununtu, using the same procedure as before.  However in
the Ubuntu  case the system fails to recognize the import statement, .i.e.
can't find org in :
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;  and of course every other log4j2
statement fails.  It seems that it can't find the log4j-core-2.11.1.jar
file.  However, I can see both jar files, log4j-api-2.11.1.jar &
log4j-core-2.11.1.jar, in the Referenced Libraries.
The steps I took are outlined below.
1. Create lib folder
2. copy log4j-api  & log4j-core to lib
3. click on above files;  f5 to refresh chose above files
6. buildpath ->AddToBuildPath The JARs will disappear from lib and reappear
in Referenced Libraries.
7. above puts them in classpath
7, Ref.
https://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-(Java)
8. Set log4j2.xml
9. Create config
3 copy to src folder

i've tried the above multiple times, logging out of eclipse between
attempts and not logging out.
Any help would be appreciated
Don

Reply via email to