Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

Call a jar file from PHP through command line

 
Raj S Kumar
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Report post to moderator
The command is working. The problem is not with the commands, but with different streams. Raised a separate question in the Java forum
 
    Bookmark Topic Watch Topic
  • New Topic