Source:
public Object saveLaunchConfigurationWithParam(String parameterStr) throws CoreException { ILaunchConfiguration config = null; ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); String projectName = this.getCodeProject().getName(); ILaunchConfigurationType type = launchManager .getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION); if (type != null) { ILaunchConfigurationWorkingCopy wc = type.newInstance(null, launchManager.generateUniqueLaunchConfigurationNameFrom(this.getCodePath().lastSegment())); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, this.getMainClass()); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, CTX_ARG + context.getName() + parameterStr); if (isRouteDebugging()) { wc.setAttribute("DEBUG_JOB_ID", this.getProperty().getId()); } setupEncryptionFilePathParameter(wc); if (isRouteDebugging()) { StringBuilder jmxArguments = new StringBuilder(); jmxArguments.append(wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "")); jmxArguments.append("\n-Dorg.apache.camel.jmx.createRmiConnector=True"); jmxArguments.append("\n-Dorg.apache.camel.jmx.rmiConnector.registryPort=1099"); jmxArguments.append("\n-Dorg.apache.camel.jmx.serviceUrlPath=/jmxrmi/camel/" + process.getName()); jmxArguments.append("\n-Dorg.apache.camel.jmx.mbeanObjectDomainName=org.apache.camel"); jmxArguments.append("\n-Dorg.apache.camel.jmx.usePlatformMBeanServer=True"); jmxArguments.append("\n-Dcom.sun.management.jmxremote.ssl=False"); jmxArguments.append("\n-Dcom.sun.management.jmxremote.authenticate=False"); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, jmxArguments.toString()); } config = wc.doSave(); } return config; }

Target:
public Object saveLaunchConfigurationWithParam(String parameterStr) throws CoreException { ILaunchConfiguration config = null; ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); String projectName = this.getCodeProject().getName(); ILaunchConfigurationType type = launchManager .getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION); if (type != null) { ILaunchConfigurationWorkingCopy wc = type.newInstance(null, launchManager.generateUniqueLaunchConfigurationNameFrom(this.getCodePath().lastSegment())); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, this.getMainClass()); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, CTX_ARG + context.getName() + parameterStr); if (isRouteDebugging()) { wc.setAttribute(Processor.DEBUG_ROUTE_ID_ARG, this.getProperty().getId()); } else { wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, true); } setupEncryptionFilePathParameter(wc); if (isRouteDebugging()) { StringBuilder jmxArguments = new StringBuilder(); jmxArguments.append(wc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "")); jmxArguments.append("\n-Dorg.apache.camel.jmx.createRmiConnector=True"); jmxArguments.append("\n-Dorg.apache.camel.jmx.rmiConnector.registryPort=1099"); jmxArguments.append("\n-Dorg.apache.camel.jmx.serviceUrlPath=/jmxrmi/camel/" + process.getName()); jmxArguments.append("\n-Dorg.apache.camel.jmx.mbeanObjectDomainName=org.apache.camel"); jmxArguments.append("\n-Dorg.apache.camel.jmx.usePlatformMBeanServer=True"); jmxArguments.append("\n-Dcom.sun.management.jmxremote.ssl=False"); jmxArguments.append("\n-Dcom.sun.management.jmxremote.authenticate=False"); wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, jmxArguments.toString()); } config = wc.doSave(); } return config; }