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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:21:15+00:00 2026-05-31T23:21:15+00:00

Are there any APIs available in Java to query jobs? In other words, I

  • 0

Are there any APIs available in Java to query jobs? In other words, I am looking for api for “jobs” command so that I can get to know status of jobs (running, stopped etc). Ideally, I would like to be able to submit jobs but I think it can be achieved easily by calling shell and pass &

  • 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-31T23:21:16+00:00Added an answer on May 31, 2026 at 11:21 pm

    If you have/develop – shell script to handle Job , then you can use java.lang.process apis to execute that shell script and see if it can serve your purpose. You can also pass arguments along with parameters. Following is the code snippets may be useful to you.

    import java.io.IOException;
    import java.io.InputStream;
    
    
    public class MYProcess
    {
       int startProcess()
       {
          String cmd = "/opt/test/bin/mystart.sh"
    
          // create a process for the shell
          ProcessBuilder pb = new ProcessBuilder("bash", "-c", cmd);
       // use this to capture messages sent to stderr
          pb.redirectErrorStream(true);                                      
          Process shell = null;
          int shellExitStatus =-1;     
          try
          {
             shell = pb.start();
          }
          catch (IOException e)
          {
             e.printStackTrace();
          }
          InputStream shellIn = shell.getInputStream();
          try
          {
             shellExitStatus = shell.waitFor();
             //logger.info("call exit status:" + shellExitStatus);
             //logger.info("If exit status is not zero then call is not successful. Check log file.");        
          }
          catch (InterruptedException e)
          {
             //logger.error("error while call" + e);
             e.printStackTrace();
          } // wait for the shell to finish and get the return code
          return shellExitStatus;
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Kdiff3 have APIs available? Or is there any comparison tool's API available that
Are there any APIs that can extract moods from a string (for use in
One can, of course, use fopen or any other large number of APIs available
Are there any publicly available libraries or APIs out there on Ubuntu that allow
Are there any APIs available that allow for access to Android tablet sensor information
Are there any web search APIs or search engines that allow automated queries?
Are there any public Web Service APIs that allow submission of an Image URL
Using UNIX socket APIs on Linux, is there any way to guarantee that I
Is there any php libraries or API's that help when dealing with X12 documents
There are many functions available in Windows API for usage, is there any book

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.