when I execute a java file using php command
exec('java test2');
it runs perfectly, while when I do the same thing on the web-server, it does nothing I am unable to find the reason, can anybody please tell me the possible reason, thanks in advance
There are so many reasons why this could fail. Try logging into your server via ssh and execute 'java -version'.
Make sure you specify
-Djava.awt.hedless=true
in your java command