Page 1 of 1

Help with executing a Jar file in PHP

Posted: Sun Jun 27, 2010 3:35 am
by HNH992
Hi
I have Jar file which does some modifications to ZIP files.
I want to execute the jar file by using PHP.
I wrote like this code:
php Code:

<?php
shell_exec('java -classpath testsign.jar testsign test.zip test2.zip');
?>

The jar file: testsign.jar
After executing the jar file, It will modify test.zip and create the modified file test2.zip.

I tried this code in AppServ and it worked.
so I uploaded it to my website and I tried it but it didn't work.
It doesn't create test2.zip
I turned off the Safe Mode and made the chmod is 777. But didn't work.



What the problem??

P.S: My hosting from Servage : http://www.servage.net

Thanks

Re: Help with executing a Jar file in PHP

Posted: Sun Jun 27, 2010 4:01 am
by requinix
The host does have Java installed, right?

Re: Help with executing a Jar file in PHP

Posted: Sun Jun 27, 2010 6:56 am
by HNH992
They told they doesn't support JSP.
Does that code need JSP?