<div>Hi,</div><div><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">I'm trying to load a configuration file (namely SolverConf.xml) into XmlSolver with the code below:</font></div><div>
<span class="Apple-style-span" style="font-family: 'courier new', monospace; "><br></span></div><div><div><font class="Apple-style-span" face="'courier new', monospace">XmlSolverConfigurer configurer = new XmlSolverConfigurer();</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">configurer.configure(SOLVER_CONFIG);</font></div><div><font class="Apple-style-span" face="'courier new', monospace">Solver solver = configurer.buildSolver();</font></div>
</div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">If I bundle SolverConf.xml file with the application .jar file, then using </font><font class="Apple-style-span" face="'courier new', monospace">SOLVER_CONFIG</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> as </font><font class="Apple-style-span" face="'courier new', monospace">/path/to/xml/file/SolverConf.xml</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> works fine.</font></div>
<div><span class="Apple-style-span" style="font-family: 'courier new', monospace; "><br></span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">But I want to use SolverConf.xml outside the .jar, so I can easiliy edit it, but I don't know what path should I pass to it.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">I know it's a Java related question, but I was wondering if anyone had a similar problem when configuring drools planner. (I've asked on stackoverflow, but none of the answers worked for me: <a href="http://stackoverflow.com/questions/7718807/can-getresourceasstream-find-files-outside-the-jar-file">http://stackoverflow.com/questions/7718807/can-getresourceasstream-find-files-outside-the-jar-file</a>)</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">(Supposing my .jar is in /some/path and the SolverConf.xml will be on /some/path/conf for example)</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Thanks,</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div>