user1790894
user1790894

Reputation: 417

set log4j in classpath in ubunthu

How can I add log4j to my classpath in a maven project org.apache.log4j.PropertyConfigurator.configure("log4j.properties"); gives me error

log4j:ERROR Could not read configuration file [log4j.properties].
java.io.FileNotFoundException: log4j.properties (No such file or directory)

Upvotes: 0

Views: 115

Answers (1)

Vikdor
Vikdor

Reputation: 24134

You generally add these properties files to src/main/resources folder for a maven project, and included it in the build properties in pom.xml:

<build>
    <resources>
        <resource>
            <directory>src/main/resources</directory>
        </resource>
    </resources>
</build>

Upvotes: 1

Related Questions