i need to integrate an java class to php program is it possible.??if so please explain???
+2
A:
Yes. It is possible. Please refer to the Manual on PHP/Java Integration
// 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'));
Gordon
2010-02-17 12:15:38
A:
- You can Start a java application as any other application from PHP using exec.
- You can interop using WebServices
Filip Ekberg
2010-02-17 12:16:19
+1 to WebServices. PHP have quite simple SOAP implementation
shuvalov
2010-02-17 12:42:43