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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:09:24+00:00 2026-05-17T02:09:24+00:00

I developed a command-line utility which needs to be called from a Java GUI

  • 0

I developed a command-line utility which needs to be called from a Java GUI application. The team in charge on the Java GUI would like to bind my command-line application to a button in the GUI; the Python application is such that at the time we have no time or interest in rewriting it in Java.

I have no experience whatsoever in Java, so I ask you:

What is the best way to bind a command-line based Python application to a button in a Java-based GUI application?

I am very concerned about exception management (how to tell Java that Python failed).

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-05-17T02:09:25+00:00Added an answer on May 17, 2026 at 2:09 am

    You should be able to execute a spawned process from Java using Runtime.exec(). Here’s some examples.

    Make sure you capture the stdout and stderr (concurrently – see this answer for more details) so you can report on errors. You can capture the exit code of the application, so make sure that the application itself correctly reports errors. The error code would be a more reliable way of detecting errors (I would suspect) thatn parsing the output streams.

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

Sidebar

Related Questions

I developed a command line application on Linux which needs its stack to be
We have a command line application that could benefit from a GUI. We want
I'm using the excellent UNIX 'comm' command line utility in an application which I
I developed a command-line (non GUI) C program on Linux using QT Creator, which
I developed a command line application, whose binary runs in Linux, Windows and Mac
I'm using this script for building application from command line: #!/bin/bash TARGET=signtest CONFIGURATION=Debug SDK=iphoneos
I read that REST WS can be called from a command line. I know
I've always developed application for personal use on command line. Now I have to
I've developed a command line tool which converts some kind of binary data to
I developed a Windows command line tool using C, and compiled it in VC++,

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.