setting xmx in runtime
<p>I have a dummy jar, whose only job is to display a simple jdialog and ask user to select required memory size from the combo provided.After selecting required maximum memory user clicks start button to run my main Jar.</p>

<p>I am using runtime.getRuntime.exec() method in dummy jar to call my main jar.</p>

<p>I have hardcoded my main jars path its working fine.But I would like to know how do I get my Main jar's location programmatically when two jars are residing in different location??</p>

<p>I can get path of my dummy jar using approach used in below link.</p>

<p><a href="http://stackoverflow.com/questions/320542/how-to-get-the-path-of-a-running-jar-file">How to get the path of a running jar file?</a></p>

<p>But please advice me to get jar path of my main program..</p>
