Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Call a jar file from PHP through command line

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic