php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48466 I'm trying to link PHP with Java, but then it doesn't see the Java classes.
Submitted: 2009-06-03 18:30 UTC Modified: 2009-06-03 20:37 UTC
From: jabujerry at tuks dot co dot za Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.9 OS: Wind XP Prof Ser Pack 2
Private report: No CVE-ID: None
 [2009-06-03 18:30 UTC] jabujerry at tuks dot co dot za
Description:
------------
This is what it says:

Fatal error: Call to undefined function java_require() in E:\wamp\www\test\helloworld.php in line 2

And I'm sure I've configured everything correctly what might be the problem?

Your help will be highly appreciated

Reproduce code:
---------------
helloworld.php

<?php
java_require('http://localhost/test/HelloWorld.jar');
$myObj = new Java('HelloWorld');
// display Hello World
echo (String) $myObj->getHelloWorld();
?>

HelloWorld.java

public class HelloWorld {
	String hw = "Hello World";
	public String getHelloWorld() {
		return hw;
	}
}




Expected result:
----------------
Hello World

Actual result:
--------------
Fatal error: Call to undefined function java_require() in E:\wamp\www\test\helloworld.php in line 2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-03 20:37 UTC] jani@php.net
Please report bugs in PECL extensions at right place: 
http://pecl.php.net/bugs/
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Aug 18 03:00:02 2025 UTC