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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:11:08+00:00 2026-05-22T02:11:08+00:00

I have an application which is in java & i have created a batch

  • 0

I have an application which is in java & i have created a batch file(.bat) of that application & running it in php like this

   <?php
      system ("cmd.exe /c final.bat");
   ?>

The output is something like this

C:\wamp\www\php>java -jar Most closely reseambling is this…C:\wamp\www\php>pause Press any key to continue . . .

I am invoking this through my android application & want this out as response…Can you tell me how to do this …. It would be great if I would be able to eliminate prompts from response.

  • 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-22T02:11:09+00:00Added an answer on May 22, 2026 at 2:11 am

    Check out the exec function. Instead of automatically printing the output, it will return the output as a string, or in an optional array of lines in the second argument. You can then parse this string or array and print only what you need.

    Example which would print all but the first line of output:

    exec('cmd.exe /c final.bat',$output);
    for($i = 1; $i < count($output); ++$i) echo $output[$i],'<br />';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one application in flex that is accessing the Java webservice using
I have an application server in Java which requires parsing a CSV file. Is
I have a Java application which I want to shutdown 'nicely' when the user
I have a layered application in Java which has a multi thread data access
I have an Java desktop application which connects directly with the DB (an Oracle).
Let's say I have an existing application written in Java which I wish to
I have written a small java application for which I need to obtain performance
I have a web application (Java, Websphere, JSP) which allows co-workers to register visitors
I have an application which extracts data from an XML file using XPath. If
I have created a java server, which takes screenshots, resizes them, and sends them

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.