aspose file tools*
The moose likes PHP and the fly likes Call a jar file from PHP through command line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » PHP
Reply locked New topic
Author

Call a jar file from PHP through command line

Raj S Kumar
Ranch Hand

Joined: Aug 06, 2006
Posts: 48
Hi,
I have a jar file which does some process and print the output to the console. This file needs to be called from PHP and the output in the Console also to be captured.

When tried directly in the command line, the Jar file works fine and prints the output to the console.

I have tried with the exec, but its not working.



The output to this is just '0 0'

Should something else be done to call the jar file??

Posted in Stackoverflow.com also. will post here once I get an answer.
Thanks in Advance.....


Raj S Kumar
Raj S Kumar
Ranch Hand

Joined: Aug 06, 2006
Posts: 48
The command is working. The problem is not with the commands, but with different streams. Raised a separate question in the Java forum
 
wood burning stoves
 
subject: Call a jar file from PHP through command line