Hi, I have a .jar file which has a command line interface. I want to call the jar file through command prompt and capture the output of the Jar file.
I have tried with the exec()
command.
The command I have used is:
<?php
exec('java -jar D:\\Development\\Filehandler\\dist\\Filehandler.jar \ getConfigLang', $result);
echo $result;
echo $count = count($result);
for($i=0; $i<$count;$i++){
print($result[$i]);
}
?>
The output for this was just '0 0'
Should something else be done before executing this command? like adding path etc??? I am using WAMP server. Please help me...