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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:19:29+00:00 2026-05-22T22:19:29+00:00

Possible Duplicate: Asynchronous shell exec in PHP i need to run a java program

  • 0

Possible Duplicate:
Asynchronous shell exec in PHP

i need to run a java program in the background.

process.php contains

shell_exec("php php_cli.php")

php_cli.php contains

shell_exec("java -jar BiForce.jar settings.ini > log.txt");

I am calling process.php asynchronously using ajax

When i click the link in the webpage that calls ajax function (for running process.php) the webage shows “loading”. when i click other links at the same time it does not responds.

The java program takes about 24 hours to finish executing, so user will not wait until the execution ends.

The problem is that the browser keeps on loading and does not go to other pages when clicked the link.

I also tried with system(), but the same problem ….

Help will greatly be appreciated.

  • 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-22T22:19:30+00:00Added an answer on May 22, 2026 at 10:19 pm

    You could call the command in the page displayed, but appending an & at the end:

    shell_exec("java -jar BiForce.jar settings.ini > log.txt &");
    

    This way the process is launched on the background.

    Also, there is no need (unless defined by your application) to create a process.php wich itself calls php via a shell exec. You could archive the same functionality via an include to the other file.

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

Sidebar

Related Questions

Possible Duplicate: How to rename java.exe/javaw.exe process? Hi, I am working on java desktop
Possible Duplicate: Using a javascript variable to set PHP variable I need to do
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: Pre & post increment operator behavior in C, C++, Java, & C#
Possible Duplicate: Should I learn C before learning C++? As a professional (Java) programmer
Possible Duplicate: Parse string into argv/argc I'm trying to write a fake shell using
Possible Duplicate: How can I increment a date by one day in Java? I
Possible Duplicate: How to create comma separated list from array in PHP? I have
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: NAnt or MSBuild, which one to choose and when? What is the

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.