Skip to main content

java fork()!!!?

1 reply [Last post]
jeremygwa
Offline
Joined: 2006-01-17

Java fork(), is there such a thing? Can I create two instances of the virtual machine in one process? Would forking have higher performance than lets say a thread?
Would I be able to do this on an nt/2000/xp machine?

your input is appreciated.

-Jer A.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
briand
Offline
Joined: 2005-07-11

No, there is no java.fork(). there is System.exec() which you could use to fire up another JVM if you so desired.

Threads are much lighter weight than processes and there are serious advantages to threads, including less context switching between different address spaces which tends to take pressure off the hardware virtual memory resources which tends to provide better performance and scalability.

Brian