Executing jar file from PHP not working
Posted: 16. March 2011 17:07
I'm working on a project where i need to start a jar file from PHP. I've used the exec() and system() function but i keep getting a error:
IO Exception while starting Log Couldn't get lock for log/logFile.log
My directory structure is
htdocs/simulation/gui/script.php
htdocs/simulation/java/jarFile.jar
I think this has something to do with file permissions, i know how to change user permissions, but for which user do you need to change it?
I have also used the absolute path (c:/www/xampp/htdocs/simulation/java/EMS2.jar)
Does anybody have a suggestion?
PS. The jar file works perfect from the commandline
IO Exception while starting Log Couldn't get lock for log/logFile.log
My directory structure is
htdocs/simulation/gui/script.php
htdocs/simulation/java/jarFile.jar
I think this has something to do with file permissions, i know how to change user permissions, but for which user do you need to change it?
- Code: Select all
exec("java -jar ./../java/EMS2.jar", $output);
print_r($output);
I have also used the absolute path (c:/www/xampp/htdocs/simulation/java/EMS2.jar)
Does anybody have a suggestion?
PS. The jar file works perfect from the commandline