File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Register / Login


JavaRanch » Java Forums » Incubator » 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.....

This message was edited 1 time. Last update was at by Raj S Kumar



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
 
 
subject: Call a jar file from PHP through command line
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture