Eclipse: Referencing log4j.dtd in log4j.xml

I know this question has been answered, but I’d like to provide my slightly different alternative:

<!DOCTYPE log4j:configuration PUBLIC
  "-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">

It is similar to @FrVaBe’s response, but on the plus side, does not require any further Eclipse configuration (i.e., if you’re sharing your project with others, or have a large team, it’s one less thing to worry about).

The down side though, is that I believe it means you’ll need an Internet connection (at least at some point during development, even if it’s just one time).

Leave a Comment