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?