I have a Maven project that I'm trying to package as both a war and a jar. As part of my application / servlet initialisation (depending on whether I'm running the jar or the war), I need to read a file called server.ini
. I've put the file in src/main/resources/server.ini
and am trying to load it like so:
System.class.getResourceAsStream("server.ini");
However, this always results in null
. What am I doing wrong?