java - How to run a jar from a web server using PHP -


i have .jar file prints on printer connected pc, when execute jar file, prints fine, placed file on apache server, when try run using php, doesn't work, blank page , nothing printed.

this do, running jar command line using php:

<?php exec("java -jar print.jar"); ?> 

i tried everything, , using full path , everything, still doesn't work. there way print on web server pc accessing php page it? or using other technology if it's not possible in php. have pdf file on server, , being printed on server printer.

i guess problem either apache or php doesn't have enough permission run itself. there way give permission?

my idea want pdf file on web server printed on server printer.

are getting errors?

exec(thejarfile, $returncode);

(docs: http://php.net/manual/en/function.exec.php)

(an answered question might help: executing .jar file php through command prompt)


Comments