Been out in the non-NetBeans world for a while and I'm trying/needing to get back but having a problem.

My app dir structure looked like this:


I used new project and selected import from existing sources in NetBeans. OK so far so good. The does a system property check for log4j.configuration and if it isn't there, it's added it with a value from a file /conf/ which has one line like:


OK the problem: My intent is to have load from the /conf in my dir structure listed, but it looks within /src/conf for (I know this because I tried adding it). I seem to have complete control over where this file is as long as it's in the /src directory. However, I cannot go below the /src directory. I tried changing the /conf/ file to:

and then copying to /src and this works. Telling me that the root dir is /src. I tried a bunch of different locations in and above /src and these all worked. But if I try something like this for /conf/ file:


or anything else below /src it cannot find You may note that I'm able to go below the /src dir for the call to open and parse /conf/

If i use command line javac like:
cd to src/com/myapp
javac -cp ../..
cd to src/
java com.myapp.myapp

this works. So I'm not sure what I'm doing wrong here. Any suggestions? Any suggestions at all?

--- additionally ----
In my file that I get running from a place at or above /src, i have an appender that writes to a log file -> ./log/myapp.log and this gets written at /log not /src/log. I'm confused, so confused at defining exactly where my properties files will be read and where my other files will be written. What am I missing?

I guess the deal is how to address the -D<key>=<value> in the compile and run of netbeans.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.