A few days ago I published this thread, and it was solved succesfully on Unix.
Now I moved to Windows and I have the same problem.
I need to execute a command from the web application. It must execute a .jar stored in the system. I looked on Google and found some changes that I needed to do.
The function to execute the command is:
<?php
if($_POST["name"] == "")
echo "name is empty";
else{
$path = $_POST["name"];
//$command = 'DISPLAY=:0 java -jar '.$path'; -> Used in Unix
//$command = 'java -jar ../../../../simulaciones/tanqueCalentamiento.jar';
$command = 'java -jar ..\..\..\..\simulaciones\tanqueCalentamiento.jar';
//system($command);
exec($command);
}
?>
The comments are different options I have tried. $path is the argument, but decided to put directly the path, to clarify my question:
Do I need a kind of “trick” as I did for Unix?
In windows vista, 7 (I don’t know if in others too), there is a problemm with xampp.
The apache does not stop, doesn’t matter what you do, even switch the computer off. At least for me, the solution was:
Start/stop it always as administrator:
path\xampp\xampp_start
path\xampp\xampp_stop
Right click: run as administrator.
In this way apache is finished properly, and I can run my command with no probleems anymore
I hope this helps
http://drupal.org/node/224342