0

Hi!

I am having an issue with executing a .jar with php.
If I do

/opt/lampp/bin/php myphp.php

the jar gets executed and the output appears in the terminal.

But if I load the php page directly in my browser, the output of the jar when executed does not appear.

Is it possible that by the time the jar gets executed, my browser has finished processing the php page and since the jar takes a little bit more time, the output does not get displayed on my browser.

If its possible, is there a solution please?
Thank you!

2
Contributors
5
Replies
20
Views
4 Years
Discussion Span
Last Post by peter_budo
0

Hi! I am trying to display the output of my .jar file in a textarea by echoing the result obtained in my php file. But its not displaying anything.

0

Don't know how you doing execution and reading from command line but you can always save jar output into file and have your php page access the file in intervals.

PS: Nevertheless I still do not see point behind this exercise. Why would you want PHP listen for JAR output messages?

0

I think your solution is better.:)
But even if I do it this way, I still need to execute my jar file with PHP. And when I do
exec ('java -jar myjar.jar'); It does not work. :S

Any idea please?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.