Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9125969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:55:40+00:00 2026-06-17T06:55:40+00:00

I created a wrapper over JavaLaunchDelegate and created a new ZLaunchConfigurationDelegate extending this .

  • 0

I created a wrapper over JavaLaunchDelegate and created a new ZLaunchConfigurationDelegate extending this . In this wrapper I tried to terminate the previous running Launch using Launch.terminate sometimes it fails to terminate .

Java Code :

public static ILaunch getLaunchObject(String launchName) {
    ILaunch launchObj = null;
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    ILaunch[] launches = launchManager.getLaunches();
    for(int i=0 ; i<launches.length ; i++) {
        ILaunch launch = launches[i];
        ILaunchConfiguration config = launch.getLaunchConfiguration();
        if(config != null) {
            String configName = config.getName();
            if(configName.equals(serviceName)) {
                launchObj = launch;
                break;
            }
        }

    }
    return launchObj;
}

public static void terminateLaunch(String launchName){
    ILaunch launch = getLaunchObject(launchName);
    if(launch != null){
        launch.terminate();
    }
}

terminateLaunch("mylaunch");

I want to force kill the process if launch.terminate will not work .

Goal

If i got the process id from an eclipse launch object . I will kill the process using os command .

Is there any way to get the process id from an launch object?

Thank You ,

Kannan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:55:41+00:00Added an answer on June 17, 2026 at 6:55 am

    Try killing all the processes and debug targets (if this Launch is in Debug mode) first and terminate the Launch.

    private void terminate(ILaunch launch){
        try{
            IProcess [] processList = launch.getProcesses();
            for(IProcess process : processList) {
                if( ! process.isTerminated() ) {
                    process.terminate();                    
                }               
                launch.removeProcess(process);
            }
    
            IDebugTarget [] debugTargetList = 
                launch.getDebugTargets();
            for(IDebugTarget debugTarget : debugTargetList) {
                launch.removeDebugTarget(debugTarget);
            } 
    
            launch.terminate();
    
        }catch(Exception ex) {
           // Exception
        }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wrapper managed application(.net) over a COM Component(created using vb6) where Com
I have installed SQLite and am using the wrapper from: http://sqlite.phxsoftware.com/ I have created
I'm using Mono to write a wrapper over a set of natively exposed commands.
I have created a wrapper which can execute a given script over SSH with
I've created a wrapper function for jQuery's $.ajax() method so I can pass different
I have a sample project here on github where I created a c++ wrapper
I recently created a generic Matrix<T> class that acts as a wrapper around a
This question might seem a repeat of previous ones. I have read through a
I'm not sure if this is a known issue that I am running into,
I need to simulate sql by creating a wrapper over mysql(customer requirement :P), and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.