开发者

why exec('java -jar file.jar') dont work on browser

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜