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?