Examples of IVMInstall


Examples of org.eclipse.jdt.launching.IVMInstall

        String runtimeLocation = getServer().getRuntime().getLocation().toString();
        GeronimoRuntimeDelegate geronimoRuntimeDelegate = (GeronimoRuntimeDelegate) getServer().getRuntime().getAdapter(GeronimoRuntimeDelegate.class);
        if (geronimoRuntimeDelegate == null) {
            geronimoRuntimeDelegate = (GeronimoRuntimeDelegate) getServer().getRuntime().loadAdapter(GeronimoRuntimeDelegate.class,new NullProgressMonitor());
        }
        IVMInstall vmInstall = geronimoRuntimeDelegate.getVMInstall();

        LibraryLocation[] libLocations = JavaRuntime.getLibraryLocations(vmInstall);
        IPath vmLibDir = null;
        for(int i = 0; i < libLocations.length; i++) {
            LibraryLocation loc = libLocations[i];
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

public class JavaScriptLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
 
  public void launch(ILaunchConfiguration configuration, String mode,
      ILaunch launch, IProgressMonitor monitor) throws CoreException {
   
    IVMInstall install = getVMInstall(configuration);
    IVMRunner runner = install.getVMRunner(launch.getLaunchMode());
    if (runner == null) {
      abort("VM not found", null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
    }
   
    //int port= SocketUtil.findFreePort();
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

        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, new String[]{vm.getName(), mode}), null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
        }
        return runner;
    }
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

        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, new String[]{vm.getName(), mode}), null, IJavaLaunchConfigurationConstants.ERR_VM_RUNNER_DOES_NOT_EXIST);
        }
        return runner;
    }
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

        IEditorPart part= EditorUtility.openInEditor(cu);
       
       
        testProject.getProject().build(
                IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
        IVMInstall vmInstall = JavaRuntime.getVMInstall(testProject
                .getJavaProject());
        if (vmInstall == null)
            vmInstall = JavaRuntime.getDefaultVMInstall();
        if (vmInstall != null) {

            IVMRunner vmRunner = vmInstall.getVMRunner(ILaunchManager.RUN_MODE);
            if (vmRunner != null) {
                String[] classPath = null;
                try {
                    classPath = JavaRuntime
                            .computeDefaultRuntimeClassPath(testProject
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

      binFolder.create(false, true, null);
      javaProject.setOutputLocation(binFolder.getFullPath(), null);
     
      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));
      }
     
View Full Code Here

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

        endorsedDirs.add(workingKarafPlatform.getParentKarafModel().getRootDirectory().append("lib/endorsed").toString()); //$NON-NLS-1$

        final List<String> extDirs = new ArrayList<String>();
        extDirs.add(workingKarafPlatform.getParentKarafModel().getRootDirectory().append("lib/ext").toString()); //$NON-NLS-1$

        final IVMInstall vmInstall = JavaRuntime.computeVMInstall(configuration);
        final File vmRootDirectory = vmInstall.getInstallLocation();
        if (vmRootDirectory != null) {
            endorsedDirs.add(new File(vmRootDirectory, "jre/lib/endorsed").getAbsolutePath()); //$NON-NLS-1$
            endorsedDirs.add(new File(vmRootDirectory, "lib/endorsed").getAbsolutePath()); //$NON-NLS-1$

            extDirs.add(new File(vmRootDirectory, "jre/lib/ext").getAbsolutePath()); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMInstall

     * @throws CoreException
     *             if there is a problem determining the Java Specification
     *             Version of the {@code VMInstall}
     */
    private String getJavaRuntimeSpecificationVersion(final ILaunchConfiguration configuration) throws CoreException {
        final IVMInstall vmInstall = JavaRuntime.computeVMInstall(configuration);
        if (!(vmInstall instanceof IVMInstall3)) {
            return System.getProperty(JAVA_SPECIFICATION_VERSION);
        }

        final IVMInstall3 vmInstall3 = (IVMInstall3) vmInstall;
View Full Code Here

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,
            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
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.