Examples of IVMInstall


Examples of org.eclipse.jdt.launching.IVMInstall

     */
    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, server.getId() );

        // 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$
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

    private void launchApacheDS()
    {
        try
        {
            // 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( "LaunchServerJob.StartingServer" ), new String[] { server.getName() } ) ); //$NON-NLS-1$

            // 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.studio.apacheds.Launcher" ); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

    public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
        throws CoreException {

        // Verify the configuration
        String mainTypeName = verifyMainTypeName(configuration);
        IVMInstall vm = verifyVMInstall(configuration);
        IVMRunner runner = vm.getVMRunner(mode);

        ExecutionArguments execArgs =
            new ExecutionArguments(getVMArguments(configuration), getProgramArguments(configuration));
        Map vmAttributesMap = getVMSpecificAttributesMap(configuration);
        String[] classpath = getClasspath(configuration);
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

          .getLaunchConfigurationType(ID_JAVA_APPLICATION);
      ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(
          null, "Start Jetty");

      // find the JRE used to start
      IVMInstall jre = JavaRuntime.getDefaultVMInstall();

      IPath forrestHome = new Path(fhome);

      // specify a JRE
      workingCopy.setAttribute(ATTR_VM_INSTALL_NAME, jre.getName());
      workingCopy.setAttribute(ATTR_VM_INSTALL_TYPE, jre
          .getVMInstallType().getId());

      // specify main type and program arguments
      workingCopy.setAttribute(ATTR_MAIN_TYPE_NAME,
          "org.mortbay.jetty.Server");
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

      // no support for launching remote servers
      return;
    }

    String mainTypeName = geronimoServer.getRuntimeClass();
    IVMInstall vm = verifyVMInstall(configuration);
    IVMRunner runner = vm.getVMRunner(mode);
   
    if(runner == null && ILaunchManager.PROFILE_MODE.equals(mode)){
      runner = vm.getVMRunner(ILaunchManager.RUN_MODE);
    }

    File workingDir = verifyWorkingDirectory(configuration);
    String workingDirName = null;
    if (workingDir != null)
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

     * (non-Javadoc)
     *
     * @see org.eclipse.wst.server.core.model.RuntimeDelegate#setDefaults(org.eclipse.core.runtime.IProgressMonitor)
     */
    public void setDefaults(IProgressMonitor monitor) {
        IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
        setVMInstall(vmInstall.getVMInstallType().getId(), vmInstall.getId());
    }
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

                // to setVMInstall to use the default JRE.
                // otherwise the array list of JRE's is one off from what is
                // in the combo; subtract 1 from the selection to get the
                // correct JRE.
                int sel = combo.getSelectionIndex();
                IVMInstall vmInstall = null;
                if (sel > 0) {
                    vmInstall = (IVMInstall) installedJREs.get(sel - 1);
                }
                getRuntimeDelegate().setVMInstall(vmInstall);
                validate();
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

            }
        }
    }

    private boolean isValidVM() {
        IVMInstall vmInstall = getRuntimeDelegate().getVMInstall();
        if (vmInstall instanceof IVMInstall2) {
            String javaVersion = ((IVMInstall2) vmInstall).getJavaVersion();
            return javaVersion != null && (javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6"));
        }
        return false;
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

        // are found in the list of installed JREs
        size = installedJREs.size();
        jreNames = new String[size + 1];
        jreNames[0] = Messages.runtimeDefaultJRE;
        for (int i = 0; i < size; i++) {
            IVMInstall vmInstall = (IVMInstall) installedJREs.get(i);
            jreNames[i + 1] = vmInstall.getName();
        }
    }
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

        wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, getRuntimeClass());

        GeronimoRuntimeDelegate runtime = getRuntimeDelegate();

        IVMInstall vmInstall = runtime.getVMInstall();
        if (vmInstall != null)
            wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, JavaRuntime.newJREContainerPath(vmInstall).toPortableString());

        String existingProgArgs = null;
        wc.setAttribute(ERROR_SETUP_LAUNCH_CONFIGURATION, (String)null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.