can php5.2.3 support Java Integration?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Description:
------------
My php version is 5.2.3,apache version is 2.2.4,and my workstation is
Windows XP SP2. Now I want to configure php to support Java Integration.



My jdk version is jdk1.5.0.

Reproduce code:
---------------
My php.ini configuration for Java is:



extension=php_java.dll

[Java]

java.class.path = "D:\php5\ext\php_java.jar; C:\Program
Files\Java\jdk1.5.0\jre\lib;C:\Program Files\Java\jdk1.5.0;"

Java.home = "C:\Program Files\Java\jdk1.5.0\bin"

java.library = "C:\Program Files\Java\jdk1.5.0\jre\bin\server\jvm.dll"


java.library.path = "D:\php5\ext"





My test sample is :



<?

// 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'));

?>

Expected result:
----------------
When I run the test sample,the apache httpd.exe occured an error and
the script doesn't run correctly.

------------------------------------------------------------------------

How can I do now ?? Please help me!

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux