*/
public static ILaunch launchApacheDS( LdapServer server )
throws Exception
{
// Getting the default VM installation
IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
// Creating a new editable launch configuration
ILaunchConfigurationType type = DebugPlugin.getDefault().getLaunchManager()
.getLaunchConfigurationType( IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION );
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance( null,
NLS.bind( Messages.getString( "ApacheDS200LdapServerAdapter.Starting" ), new String[] //$NON-NLS-1$
{ server.getName() } ) );
// Setting the JRE container path attribute
workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmInstall
.getInstallLocation().toString() );
// Setting the main type attribute
workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
"org.apache.directory.server.UberjarMain" ); //$NON-NLS-1$