Is *this* really the best way to start a second JVM from Java code?

I think that the answer is “Yes”. This probably as good as you can do in Java using system independent code. But be aware that even this is only relatively system independent. For example, in some systems:

  1. the JAVA_HOME variable may not have been set,
  2. the command name used to launch a JVM might be different (e.g. if it is not a Sun JVM), or
  3. the command line options might be different (e.g. if it is not a Sun JVM).

If I was aiming for maximum portability in launching a (second) JVM, I think I would do it using wrapper scripts.

Leave a Comment