Page 1 of 1

PHP exectes Java?

Posted: Sun Nov 06, 2011 2:54 am
by simaremare
dear all,

i have a question related to PHP and Java, as i will explain below.
idea : the main idea is "executing java class from PHP".
sub-idea: the java class will process what user inputs into it.
example: a java class named Max.class can read a line of numbers (eg. "1 2 3 4 2 2") and determine which number is the biggest one then display it (in console execution). after it display the result then it will wait the next input in which will be processed again.
problem: above scenario is if we work on terminal/console and directly execute the class file. can we do that on PHP,.?
expected scenario: there will be a page with a textarea, user can type all the inputs that will be passed into the java class execution (multi-line inputs means a few times execution request). PHP will then execute the java class and pass all given inputs (NOT as arguments). PHP will keep sending the input and will stop only when all inputs are processed. after that, PHP will display all result back to the user.

problem reminder: sending 'interactive input' during java execution time through PHP.
thank you in adoes anyone has solutions?

thank you in advance, :)