Package org.eclipse.jdt.launching

Examples of org.eclipse.jdt.launching.IVMInstall


        }
    }
   
    private IVMInstall retrieveVMInstall() {
        // currently only default VM
        IVMInstall vm = JavaRuntime.getDefaultVMInstall();
        return vm;
    }
View Full Code Here


      StringBuffer jvmArguments = new StringBuffer();
      while (it.hasNext()) {
        jvmArguments.append(" " + it.next());
      }

      IVMInstall vmInstall = WGAExecutionEnvironment.findVMInstallById(runtime.getConfiguration().getExecutionEnvironmentId());
      if (vmInstall == null) {
        vmInstall = JavaRuntime.getDefaultVMInstall();
      }
      List<IPath> classPath = getClasspath(_catalinaHome, vmInstall.getInstallLocation());
      String[] bootClasspath = new String[0];
           
      _tomcatInstance = VMRuntime.runVM("WGA Runtime", vmInstall, MAIN_CLASS, classPath, bootClasspath, jvmArguments.toString(), programArguments.toString(), store.getBoolean(PreferenceConstants.JAVA_DEBUG),  store.getBoolean(PreferenceConstants.JAVA_DEBUG), false);
      _currentRuntime = runtime;
           
View Full Code Here

        monitor.subTask("Verifying launch attributes..");

        String mainTypeName = verifyMainTypeName(configuration);

        IVMInstall vm = verifyVMInstall(configuration);

        IVMRunner runner = vm.getVMRunner(ILaunchManager.DEBUG_MODE); // we always run in debug mode
        if (runner == null) {
            abort(MessageFormat.format("JRE {0} does not support debug mode.", new String[] { vm.getName()}), null,
                    IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
        }

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

     * @throws CoreException
     */
    public void insertAspect(IType aspect, String address, boolean active, String txId) throws CoreException {
        IJavaProject project = aspect.getJavaProject();

        IVMInstall vmInstall = getVMInstall(project);
        if (vmInstall == null) return;
        IVMRunner vmRunner = vmInstall.getVMRunner(ILaunchManager.RUN_MODE);
        if (vmRunner == null) return;

        String[] classPath = computeClasspath(project);
        VMRunnerConfiguration vmConfig = new VMRunnerConfiguration(MAIN_CLASS, classPath);

View Full Code Here

     * @param project Java project for which the VM install is returned
     * @return Default Java VM install
     * @throws CoreException
     */
    protected IVMInstall getVMInstall(IJavaProject project) throws CoreException {
        IVMInstall vmInstall = JavaRuntime.getVMInstall(project);
        if (vmInstall == null) vmInstall = JavaRuntime.getDefaultVMInstall();
        return vmInstall;
    }
View Full Code Here

        vmconfig.setBootClassPath(getBootpath(config));
        vmconfig.setEnvironment(getEnvironment(config));
        vmconfig.setProgramArguments(LaunchHelper.getProgramArgs(config));

        IVMInstall install = getVMInstall(config);

        IVMRunner runner = install.getVMRunner(mode);

        setDefaultSourceLocator(launch, config);

        SigilCore.log("VM=" + install.getName());
        SigilCore.log("Main=" + vmconfig.getClassToLaunch());
        SigilCore.log("VMArgs=" + Arrays.asList(vmconfig.getVMArguments()));
        SigilCore.log("Boot Classpath=" + Arrays.asList(vmconfig.getBootClassPath()));
        SigilCore.log("Classpath=" + Arrays.asList(vmconfig.getClassPath()));
        SigilCore.log("Args=" + Arrays.asList(vmconfig.getProgramArguments()));
View Full Code Here

        } while (vmInstallType.findVMInstall(id) != null);

        VMStandin newVm = new VMStandin(vmInstallType, id);
        newVm.setName("Default-VM");
        newVm.setInstallLocation(installLocation);
        IVMInstall realVm = newVm.convertToRealVM();
        JavaRuntime.setDefaultVMInstall(realVm, new NullProgressMonitor());

        // wait for the default vm reconfiguration to settle
        // TODO - find something to poll agains rather than sleeping blindly
        Thread.sleep(5000);
View Full Code Here

  }

  private static void setClassPath(IJavaProject javaProject)
      throws JavaModelException {
    List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
    IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
    LibraryLocation[] locations = JavaRuntime.getLibraryLocations(vmInstall);
    for (LibraryLocation element : locations) {
     entries.add(JavaCore.newLibraryEntry(element.getSystemLibraryPath(), null, null));
    }
    //add libs to project class path
View Full Code Here

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

        return DebugPlugin.getDefault().getBreakpointManager()
             .getBreakpoints(IDroolsDebugConstants.ID_DROOLS_DEBUG_MODEL);
    }

    public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) throws CoreException {
        IVMInstall vm = verifyVMInstall(configuration);
        IVMRunner runner = new DroolsVMDebugger(vm);
        if (runner == null) {
            abort(MessageFormat.format(LaunchingMessages.JavaLocalApplicationLaunchConfigurationDelegate_0, vm.getName(), mode), null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
        }
        return runner;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.launching.IVMInstall

Copyright © 2018 www.massapicom. 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.