I am about to go insane.
for hours, trying the same and does not work I have the following code:
<?php
exec('java -jar /home/user/classname.jar --some arguments',$output,$result);
works if I run from the command line, but if you get on my server and I try to run just does not work, I have tried with other command and work perfectly as "java -vers开发者_开发问答ion", ls, mkdir, chmod, cp, date, etc
the problem is the architecture of the OS, the. jar was compiled in Windows 7 64Bits with 1.6_26 32-bit and the server has Linux x86_64. i compile again .jar files and work fine.
"write once, run anywhere." ...of course
精彩评论