Calling JAVA classes in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mtoure
Forum Newbie
Posts: 1
Joined: Fri Oct 15, 2004 2:12 pm

Calling JAVA classes in PHP

Post by mtoure »

I'm testing the integration of JAVA in PHP (APACHE, PHP4, XP, IE6). I got a couple of headaches. Could someone help me ?

1) Configured PH4 () and tested basic examples I found in http://maodotoure/mppdump/index.php. Exmaple 1 worked fine. With example 2 I got "Internal Server Error".

2) I created my own basic class example and tried to call it in PHP. Compilation is OK. But, constructor always returns null.

3) Below is my JAVA configuration in php.ini.

[Java]

;extension=php_java.dll -- already included (extension file)

java.class.path="c:\Program Files\php\extensions\php_java.jar;c:\Program Files\php\jlib\msproject\junit.jar;c:\Program Files\php\jlib\msproject\jakarta-poi.jar;c:\Program Files\php\jlib\msproject\mpxj.jar;c:\Program Files\php\jlib\msproject\prjdump.jar"
java.home="c:\Program Files\java\j2re1.4.2_05\bin"
java.library="c:\j2sdk1.4.2_05\jre\bin\server\jvm.dll"
java.library.path="c:\Program Files\php\extensions"
Post Reply