arutaku arutaku - 10 months ago 65
Java Question (No such file or directory)

I am using maven and log4j, but the app cannot load that is in "/" and "/WEB-INF/classes/" inside my WAR file.

In my Java code:

try {
Properties props = new Properties();
props.load(new FileInputStream(""));
} catch (Exception e) {

Do I need extra configuration in my pom.xml? (apart from the dependency)

Thank you in advance.

Answer Source

Try to use

 InputStream is = this.getClass().getClassLoader().getResourceAsStream("");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download