Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Compile and Run Program with Apache Log4j 1.x
How to compile and run my program with Log4j 1.x? My program uses Log4j API only and I want to know which JAR file is needed.
✍: FYIcenter.com
If your program is using Log4j 1.x API, you can compile and run the program with the only Log4j JAR file, like log4j-1.2.17.jar.
If you are using older versions of JDK, you may need to use older releases of Log4j 1.x JAR. See the JDK compatibility table below:
Release JDK Date ------- --- ---------- Apache Log4j 1.2.17 1.4 2012-05-06 Apache Log4j 1.2.16 1.1 2013-02-01 Apache Log4j 1.2.15 1.1 2007-08-30 Apache Log4j 1.2.1 1.1 2004-04-19 Apache Log4j 1.1.3 1.1 2004-04-19 Apache Log4j 1.0.4 1.1 2004-04-19
Here is a compilation and running session with the HelloLog4j.java program provided in the last tutorial.
fyicenter> java -version java version "1.7.0_45" fyicenter> javac -cp log4j-1.2.17.jar HelloLog4j.java fyicenter>java -cp .;log4j-1.2.17.jar HelloLog4j Logger class: org.apache.log4j.Logger 1 [main] FATAL HelloLog4j - Hello - fatal 3 [main] ERROR HelloLog4j - Hello - error 3 [main] WARN HelloLog4j - Hello - warn 4 [main] INFO HelloLog4j - Hello - info 4 [main] DEBUG HelloLog4j - Hello - debug
The above session shows that:
⇒ Configuration Properties File for Apache Log4j 1.x
⇐ Hello Program with Apache Log4j 1.x
2015-12-11, 2122🔥, 0💬
Popular Posts:
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
How to download and install Apache XMLBeans Source Package? The source package contains Java source ...
How to download and install ojdbc7.jar for Oracle 12c R1? ojdbc8.jar for Oracle 12c R1 is a Java 7 a...