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

  • Home
  • SEARCH
  • 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 8921205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:28:48+00:00 2026-06-15T06:28:48+00:00

By using Apache Commons-Exec I can start a program successfully, however the starter program

  • 0

By using Apache Commons-Exec I can start a program successfully, however the starter program suspended after the program started.

May I ask how to start a program and exit immediately so it will not block the following execution?

DefaultExecutor executor = new DefaultExecutor();
executor.execute( "cmd /c start C:\\Users\\xx\\program.exe");

I’m on Win7 64bit.

Thanks

  • 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-15T06:28:49+00:00Added an answer on June 15, 2026 at 6:28 am

    According to documentation, execute(CommandLine) starts synchronous execution. That is, it blocks the calling thread. You probably want asynchronous execution, so use execute(CommandLine command, ExecuteResultHandler handler). For example,

    DefaultExecutor executor = new DefaultExecutor();
    executor.execute(new CommadLine("cmd /c start C:\\Users\\xx\\program.exe"),
                     new DefaultExecuteResultHandler());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Apache Commons Exec and trying to start subprocess that would work for
I am trying to run mathtext from a java program using apache-commons-exec. The problem
I am using Apache Commons File Uploader API. It is working successfully when I
I'm using Apache Commons Configuration library to store my app properties. I can monitor
I am using Apache Commons Exec on a web application in JBoss 4.2.3. Whenever
Just started using Apache Commons StringEscapeUtils . According to http://www.w3schools.com/tags/ref_entities.asp , Ö should correspond
I'm using Apache Commons Email 1.1 and I can't figure out how to attach
Using Apache Commons VFS , how do I monitor the progress of a file
I'm using Apache Commons FTP to upload a file. Before uploading I want to
I am using apache commons-net for downloading a file from an FTP server. That

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.