是否可以集成java和PHP

i need to integrate an java class to php program is it possible.??if so please explain???

I think it is possible. Check this : PHP to Java bridge

Yes. It is possible. Please refer to the Manual on PHP/Java Integration

Example

// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');

// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br />';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
             $system->getProperty('os.version') . ' on ' .
             $system->getProperty('os.arch') . ' <br />';

// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
                      "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

echo $formatter->format(new Java('java.util.Date'));
  • You can Start a java application as any other application from PHP using exec.
  • You can interop using WebServices