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 8407905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:29:54+00:00 2026-06-09T23:29:54+00:00

I am calling an external application from my Java GUI. The Java code is

  • 0

I am calling an external application from my Java GUI. The Java code is below when the user hits the “RUN” button in the GUI:

Runtime runme = Runtime.getRuntime();
runme.exec("MyApp.bin");

MyApp.bin does some math calculations and has some loops in it – no big deal. What happens is that MyApp.bin gets stuck! When I close my Java GUI, then MyApp.bin continues to run and finishes. If I run MyApp.bin directly from the terminal, then it runs fine without freezing. Why does my application freeze when it is run from the Java GUI, but resumes when I close the Java GUI? What is the Java GUI or Java code doing that is blocking my application from running successfully?

  • 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-09T23:29:55+00:00Added an answer on June 9, 2026 at 11:29 pm

    I’m going to make a wild guess that MyApp.bin is outputting something to its standard out, and you’re not reading it. This causes the buffer to fill, and blocks your process.

    Runtime.exec() returns a Process object. If you read the javadoc for that you’ll find:

    The created subprocess does not have its own terminal or console. All
    its standard io (i.e. stdin, stdout, stderr) operations will be
    redirected to the parent process through three streams
    (getOutputStream(), getInputStream(), getErrorStream()). The parent
    process uses these streams to feed input to and get output from the
    subprocess. Because some native platforms only provide limited buffer
    size for standard input and output streams, failure to promptly write
    the input stream or read the output stream of the subprocess may cause
    the subprocess to block, and even deadlock.

    http://docs.oracle.com/javase/6/docs/api/java/lang/Process.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Current situation I'm executing an external application (by using Runtime.getRuntime().exec ... example here )
Our Java application receives XML messages from a number of external systems and from
I want to invoke an external GUI application from a python script which will
While calling from my Web Application, WCF response i am getting is : <s:Envelope
My application has to provide the ability of calling different functions and procedures from
I have a problem when calling a method from an external web service. The
My target is to call an external program from my C# application and keep
Does connection pooling db connections make sense when java code is called from a
I am calling 5 external servers to retrieve XML-based data for each request for
Calling the WriteObject Method from a background thread is not possible! Is there a

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.