Hi, I have a jar file of my application which has more than one class. The jar file is called by PHP through the command prompt. I am using the following PHP snippet to call the jar file.
<?php
$result=popen('java -jar D:\\Development\\Filehandler\\dist\\Filehandler.jar getConfigLang', "r");
while(!feof($result)){
print fread($result, 1024);
flush();
}
fclose($result);
?>
The problem here is interesting. I am able to get the 'System.out.println' statements which are in the main function. But unable to get the output statements from other classes.
I have tried with exec() also. The .jar is working fine and when called from the command prompt directly, its working fine.
Is there a way to capture the whole output?