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.
I am using runtime.getRuntime.exec() method in dummy jar to call my main jar.
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??
I can get path of my dummy jar using approach used in below link.
How to get the path of a running JAR file?
But please advice me to get jar path of my main program..