Set home or working directory
<p>I have a java application and have bundled it as <code>App.jar</code>. There are some third party tools I have used (lets call it <code>NumberGenerator</code>). <code>App.jar</code> starts a process and calls <code>NumberGenerator</code> to get the output. To refer the executable, I have used relative paths <code>new File("lib/NumberGenerator.exe")</code> and it works all well.</p>

<p>Now on Mac, i have bundled the application using <a href="http://java.net/downloads/appbundler/appbundler.html" rel="nofollow">this</a> and it automatically generates an application launcher. When I run by clicking at launcher, it launches the application. But it sets the home directory as <code>~</code> i.e. <code>/Users/Jatin</code> and not where the jar file was lying. Hence my application is unable to detect the <code>lib</code> folder (Obviously because it doesn't lie in that location)</p>

<p>In my Java code, how do I set the home folder as where my <code>jar</code> was lying?</p>
