Hi,
ich benutze in meinem Programm log4j und nehme die Konfiguration per XML vor. Wenn ich das Programm in eclipse starte, läuft alles problemlos. Jetzt habe ich eine Jar Datei draus gemacht und habe die log4j.xml und log4j.dtd ebenfalls in die jar datei gepackt (beide im root verzeichnis des jars). Die log4j.xml scheint er zu finden, aber die dtd irgendwie nicht, denn folgende ausgabe kommt
Wie kann ich das umgehen? Bzw wie kann ich angeben, dass die dtd im jar file ist?
Danke im voraus
SebiB90
ich benutze in meinem Programm log4j und nehme die Konfiguration per XML vor. Wenn ich das Programm in eclipse starte, läuft alles problemlos. Jetzt habe ich eine Jar Datei draus gemacht und habe die log4j.xml und log4j.dtd ebenfalls in die jar datei gepackt (beide im root verzeichnis des jars). Die log4j.xml scheint er zu finden, aber die dtd irgendwie nicht, denn folgende ausgabe kommt
Code:
>java -jar KassenSystemV2
log4j:WARN Could not find [log4j.dtd] using [sun.misc.Launcher$AppClassLob86e7] class loader, parsed without DTD.
log4j:WARN Continuable parsing error 4 and column 22
log4j:WARN Element type "log4j:configuration" must be declared.
log4j:WARN Continuable parsing error 5 and column 68
log4j:WARN Element type "appender" must be declared.
log4j:WARN Continuable parsing error 6 and column 52
log4j:WARN Element type "layout" must be declared.
log4j:WARN Continuable parsing error 7 and column 66
log4j:WARN Element type "param" must be declared.
log4j:WARN Continuable parsing error 11 and column 9
log4j:WARN Element type "root" must be declared.
log4j:WARN Continuable parsing error 12 and column 31
log4j:WARN Element type "priority" must be declared.
log4j:WARN Continuable parsing error 13 and column 34
log4j:WARN Element type "appender-ref" must be declared.
(logging fängt an)
Wie kann ich das umgehen? Bzw wie kann ich angeben, dass die dtd im jar file ist?
Danke im voraus
SebiB90