开发者

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

开发者 https://www.devze.com 2023-04-09 03:18 出处:网络
I am about to go insane. for hours, trying the same and does not work I have the following code: <?php

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

精彩评论

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