|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33718 Problems with Java & PHP integration
Submitted: 2005-07-16 04:35 UTC Modified: 2005-07-18 03:56 UTC
From: tuta at digi dot com dot br Assigned:
Status: Not a bug Package: Java related
PHP Version: 5.0.4 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tuta at digi dot com dot br
New email:
PHP Version: OS:


 [2005-07-16 04:35 UTC] tuta at digi dot com dot br
Hi All,
	I just downloaded(few hours ago) PHP 5.04  for Windows ( + PECL(, 
and i was trying to make PHP and talk with some of my Java Classes.  I created some simple files just to start, something like this:

Filename : "java.php"

 $j = new Java("Hello");
 print  $j->hello("All");

Filename: ""

class Hello {
public String hello(String name) {
  return "Hello " + name + ", how are you?";

Here is my php.ini

java.class.path= "c:\php\ext\php_java.jar;c:\php\ext;c:\java_classes"
java.home	 = C:\jdk1.5.0\jre\bin\
java.library.path= c:\php\ext
java.library= C:\jdk1.5.0\jre\bin\server\jvm.dll

When i tried to run my "java.php" on my Apache Server(2.0.53 Win32), my web browser(FireFox) showed me the message "The Document Contains no Data", and i
found many messages "Parent: child process exited with status 3221225477 -- Restarting." on my Apache's log file.
I also tried to run "java.php" from console(using "php.exe java.php") , but without any success and without any error message, the php.exe just jump to another 
line without complains.  So, i tried to spy the process using some debug tools  to figure it out what was the problem, and i found it inside "php_java.jar"  
file and here it is:
	- There is a little space after the name "php_java" in the file ""(line library=php_java), and when the "reflect.class" tries to find 
the lib.( System.loadLibrary(bundle.getString("library") <--  ); it will always look for "php_java .dll"(with space!). I fixed manually my "" and 
everything is fine now. I hope this information could help someone with the same problem.

						Best Regards,

							Tuta Muniz


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-18 02:38 UTC]
Report bugs about PECL extensions at

 [2005-07-18 03:56 UTC] tuta at digi dot com dot br
Thank you!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 09:01:27 2024 UTC