Problem with static attributes
Hi everyone! My name is Andre and I'm currently stuck with a problem I just can't figure out how to solve, so I though maybe you all could give me some hints.
Basically, my problem is that I'm working on a project that requires me to run multiple instances of someone else's 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.
I thought about creating a .jar and using a Runtime.getRuntime().exec( "myprog.jar" ); 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.
Sorry if this comes as a rookie question, but I really have no idea of how to get around this...
Thanks a lot and kind regards,