Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
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 (322)
Collections:
Other Resources:
Run Sort.java Example in log4j-1.2.17.zip
How to run the Sort.java example program in log4j-1.2.17.zip? I have log4j-1.2.17.zip installed at \fyicenter\apache-log4j-1.2.17 folder.
✍: FYIcenter.com
Sort.java is an example program provided in the log4j-1.2.17.zip.
It is used to show you how to use Log4j with the properties file configuration.
Here are files and locations related to Sort.java example:
05/06/2012 01:00 PM 3,231 Sort.java 05/06/2012 01:00 PM 2,872 SortAlgo.java 05/06/2012 01:00 PM 1,845 sort1.properties 05/06/2012 01:00 PM 2,877 sort2.properties 05/06/2012 01:00 PM 1,848 sort3.properties 05/06/2012 01:00 PM 1,970 sort4.properties
Let's run the Sort.java with the first configuration file, sort1.properties:
\fyicenter>cd \fyicenter\apache-log4j-1.2.17
\fyicenter\apache-log4j-1.2.17>java -version
java version "1.7.0_45"
\fyicenter\apache-log4j-1.2.17>javac -cp .;log4j-1.2.17.jar examples\Sort.java
\fyicenter\apache-log4j-1.2.17>java -cp .;log4j-1.2.17.jar examples.Sort
examples\sort1.properties 10
0 INFO [main] examples.Sort - Populating an array of 10 elements
in reverse order.
2 INFO [main] examples.SortAlgo - Entered the sort method.
3 DEBUG [main] examples.SortAlgo.OUTER i=9 - in outer loop.
3 DEBUG [main] examples.SortAlgo.INNER i=9 j=0 - in inner loop.
3 DEBUG [main] examples.SortAlgo.SWAP i=9 j=0 - Swapping intArray[0]=9
and intArray[1]=8
3 DEBUG [main] examples.SortAlgo.INNER i=9 j=1 - in inner loop.
...
18 DEBUG [main] examples.SortAlgo.OUTER i=1 - in outer loop.
18 DEBUG [main] examples.SortAlgo.INNER i=1 j=0 - in inner loop.
18 DEBUG [main] examples.SortAlgo.SWAP i=1 j=0 - Swapping intArray[0]=1
and intArray[1]=0
18 DEBUG [main] examples.SortAlgo.OUTER i=0 - in outer loop.
18 INFO [main] examples.SortAlgo.DUMP - Dump of integer array:
18 INFO [main] examples.SortAlgo.DUMP - Element [0]=0
18 INFO [main] examples.SortAlgo.DUMP - Element [1]=1
19 INFO [main] examples.SortAlgo.DUMP - Element [2]=2
19 INFO [main] examples.SortAlgo.DUMP - Element [3]=3
19 INFO [main] examples.SortAlgo.DUMP - Element [4]=4
19 INFO [main] examples.SortAlgo.DUMP - Element [5]=5
19 INFO [main] examples.SortAlgo.DUMP - Element [6]=6
19 INFO [main] examples.SortAlgo.DUMP - Element [7]=7
19 INFO [main] examples.SortAlgo.DUMP - Element [8]=8
19 INFO [main] examples.SortAlgo.DUMP - Element [9]=9
19 INFO [main] examples.Sort - The next log statement should be an error message.
19 ERROR [main] examples.SortAlgo.DUMP - Tried to dump an uninitialized array.
20 INFO [main] examples.Sort - Exiting main method.
⇒ Sort.java with sort2.properties in log4j-1.2.17.zip
⇐ Run Trivial.java Example in log4j-1.2.17.zip
2016-06-27, ∼3129🔥, 0💬
Popular Posts:
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
JDK 11 jdk.dynalink.jmod is the JMOD file for JDK 11 Dynamic Linking module. JDK 11 Dynamic Linking ...
JDK 11 java.compiler.jmod is the JMOD file for JDK 11 Compiler module. JDK 11 Compiler module compil...