Change the default output folder for a java command when executed by php
Posted
by jax
on Stack Overflow
See other posts from Stack Overflow
or by jax
Published on 2010-06-17T10:50:10Z
Indexed on
2010/06/17
10:53 UTC
Read the original article
Hit count: 162
I am trying to run a java command like this in a PHP Joomla Component. It works, however, the files generated from the command are written to /administrator and I want them to be written to the location where the Java command resides ie. /administrator/com_mycomponent/java/MyJavaApp.jar
//run the command
$javaCommand = "$javaCommand -jar $keyGeneratorFile $appName";
$response = exec($javaCommand);
if(empty($response)) {
JError::raiseError(500, "Key Generation failed for command: $javaCommand");
}
What can I do? Is there some sort of option I can use with the java command?
© Stack Overflow or respective owner