I have a java application (a genetic algorithm, to be precise) that periodically starts a native process (the fitness function), waits for it to complete and reads the file it outputs. However, the native process can only be run once, because it reads from a conf file and binds a few sockets. Is there a way to virtualize the native process so that I can run multiple copies simultaneously?
I have a java application (a genetic algorithm, to be precise) that periodically starts
Share
Judging from your tags, i think you’re asking if there’s a java API for machine virtualisation. Sadly, there isn’t.
Of course, you can use java (with such native glue code or scripts are as necessary) to drive anything the operating system can do, so you could use java to spawn VMs to run the fitness program. Might be rather painful, though.
Are the ports bound specified in the conf file? Could you use a procedure like:
To have several running at once?
Even better, if you can tell the program where to look for its config file, you can do this without the lock:
Any use?