logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreea Stefanescu <andreia.stefane...@axetel.com>
Subject Re: Is it possible to use Log4j from within a jar?
Date Fri, 25 Apr 2003 16:05:10 GMT
I have another (newbie too :-\) question related to this one:

Where do I have to put a properties file for log4j in a jar so that it is 
found when calling DOMConfigurator.configure() method?

On Friday 25 April 2003 08:04 am, Xavier Outhier wrote:
> Hi all,
>
> Newbie question (off course).
> Is it possible to use Log4J for an application that is in a jar?
>
> I add Log4J logger in my applications and it works fine when
> using NetBeans internal execution. Unfortunately, I was not
> able to use it when my application was put into a jar.
> I tried to add classpath to the Log4j jar but without success.
> Here are the error output:
>
> D:\Manta4>java -jar aanthill.jar
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/log4j/Logger at Debug.AppliManta.<clinit>(AppliManta.java:20)
>         at Application.Manta.<init>(Manta.java:27)
>         at Application.Manta.main(Manta.java:78)
>
> D:\Manta4>java -cp D:\log4j\log4j-1.2.7.jar -jar aanthill.jar
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/log4j/Logger at Debug.AppliManta.<clinit>(AppliManta.java:20)
>         at Application.Manta.<init>(Manta.java:27)
>         at Application.Manta.main(Manta.java:78)
>
> Any idea? Problem in the jar manifext classpath? Should I include the
> log4j jar in my jar, how?
>
> Best Regards,
>
> Xavier.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message