Problem with static attributes
<p>My problem is that I'm working on a project that requires me to run multiple instances of someone elses code which has many static attributes/variables, which causes all the instances to share those resources and, well, crash. I can run multiple instances of this other person's program if I create a .jar file off of it and open it multiple times by running the .jar in windows, but running calling the "main" method multiple times in my code (which is what I need to do) won't work.</p>

<p>I thought about creating a .jar and using <code>Runtime.getRuntime().exec( "myprog.jar" );</code> to call the program multiple times, but that won't work for me since I have to pass an instance of my object to this new program and I don't think this solution would allow for that.</p>

<p>PS: <a href="http://forums.sun.com/thread.jspa?threadID=5422216&amp;tstart=0" rel="nofollow">This is also posted in the Sun forums</a>, so I`ll post the answer I get there here or the answer I get here there naturally giving proper credit once I this is solved =P.</p>
