/**
* Returns the configuration of the current host JVM (including the flags used to create it). Any
* args specified using {@code vm.args} will also be applied
*/
public VmConfig getDefaultVmConfig() {
return new Builder(new File(System.getProperty("java.home")))
.addAllOptions(Collections2.filter(ManagementFactory.getRuntimeMXBean().getInputArguments(),
new Predicate<String>() {
@Override public boolean apply(@Nullable String input) {
// Exclude the -agentlib:jdwp param which configures the socket debugging protocol.
// If this is set in the parent VM we do not want it to be inherited by the child