I have a PHP Project
with the name itext
. Inside this folder I have a workspace
folder.
So the Path to the Java Class file is like this:
itext/workspace/sampleproject/checkFonts.java
I have an index.php
file in itext
folder. How can I execute the shell_exec
command in the index.php for the java file located in the above path?
UPDATE:
As per the answer I tried out stuffs and executed the below code and it works but I am getting the below error:
$output = array();
exec('java workspace/itext/src/itext/CheckFonts 2>&1',$output);
print_r($output);
Error:
Array ( [0] => Error: Could not find or load main class workspace.itext.src.itext.CheckFonts )