I have placed BasicAccountRule.drl in my web application at location : C:/workspace/exim_design/src/main/resources/rules/drl/inpatient/BasicAccountRule.drl
Now, I have been using code :
File file = new File ("C:/workspace/exim_design/src/main/resources/rules/drl/inpatient/BasicAccountRule.drl");
This is working fine on my system, but while I am trying to run this code on another system I am getting error : java.io.FileNotFoundException
I know I am getting this error because I have hardcoded file path. And ( C:/workspace/exim_design ) will be different for every system/server.
So, how to make this path dynamic and use inside:
File file = new File ()
, so that it will run on every machine.