Cross-platform jvm launcher?
I'm lookin开发者_如何学运维g at http://akuma.kohsuke.org/, but it's only for POSIX systems. I don't need daemonization, just an orderly way to launch more jvms from a java program. Yes, ProcessBuilder, but how do I find the right java.exe?
System property java.home
contains path to current java home. For example on my computer it is C:\Program Files\Java\jdk1.6.0_21\jre.
So, the following statement System.getProperty("java.home") + "/bin/java"
should give you the fully qualified path to your current JVM.
If you want to be even more cross platform use File.separator instead of slash.
精彩评论