When multiple java programs run on the same machine

后端 未结 2 1465
孤街浪徒
孤街浪徒 2020-12-07 09:08

Each java application will run in a specific Java Virtual Machine Instance. I am really getting confused on below aspects and Googling has confused me even more. Different

2条回答
  •  爱一瞬间的悲伤
    2020-12-07 09:57

    1. see How to Daemonize a Java Program?
    2. new instance of JVM will be created
    3. the same way as memory is shared between all other processes
    4. it is managed by O/S
    5. other instances are not affected

    If your instances have to coordinate their work, you can create single main instance which would run/stop other instances.

    You did not explain why you need multiple JVM instances. Probably, single instance would work better.

提交回复
热议问题