Hi,
I'm trying to refer to a properties file in my NetBeans project using Maven.
While developing, I used the following code:
MyClass.loadProperties("src/main/resources/neo4j.properties");
This worked fine.
Now that I've just built my project to a JAR, when I execute it, it complains that it can't find this file.
I don't want the file to be in the JAR file - I'd really just like to be able to specify a location to load the properties file from - probably the same directory as the main JAR.
What path should I use? In fact, I'm not clear on how this works at all - I ran into a similar issue with a previous project.
I think the src/main/resources is specific to Maven isn't it? When a JAR is running, are all directories relative to the one in which the JAR is located?
Help!