Link to home
Start Free TrialLog in
Avatar of rakhare
rakhare

asked on

log4j for applet


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?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rakhare
rakhare

ASKER


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?
:-)

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