<div>Hi,</div><div><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">I&#39;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: &#39;courier new&#39;, monospace; "><br></span></div><div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">XmlSolverConfigurer configurer = new XmlSolverConfigurer();</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">configurer.configure(SOLVER_CONFIG);</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Solver solver = configurer.buildSolver();</font></div>
</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace">SOLVER_CONFIG</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> as </font><font class="Apple-style-span" face="&#39;courier new&#39;, 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: &#39;courier new&#39;, 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&#39;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&#39;s a Java related question, but I was wondering if anyone had a similar problem when configuring drools planner. (I&#39;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="&#39;courier new&#39;, monospace"><br>
</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div>