Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

log4j for applet

Posted on 2005-04-01
3
Medium Priority
?
676 Views
Last Modified: 2008-02-01

How can I direct log4j output to the java console? Where and how do I keep and access the property file for this to happen?
0
Comment
Question by:rakhare
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 300 total points
ID: 13682889
You need a ConsoleAppender. You can't hope to use log4j without reading the manual. Here's the short one:

http://logging.apache.org/log4j/docs/manual.html
0
 

Author Comment

by:rakhare
ID: 13702431

Ok, I read it all.

Now here's what I did:

1. I put the log4j jar file in the root of my applet classes
2. Compiled all with the jar file in the classpath
3. When I run the applet, I get the following:

java.lang.reflect.InvocationTargetException
      at java.awt.EventQueue.invokeAndWait(Unknown Source)
      at org.bmc.misu.md.cms.PresentationServices.MainApplet.init(MainApplet.java:18)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/BasicConfigurator

What is it?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13716054
:-)

Make sure log4j.jar is in the applet's archive tag
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question