ID: 27151
Updated by: [EMAIL PROTECTED]
Reported By: genius_cse at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Java related
Operating System: Windows XP SP1
PHP Version: 4.3.4
New Comment:
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same.
Thank you for your interest in PHP.
search the java/servlet related bug reports before you submit yet
another report.
Previous Comments:
------------------------------------------------------------------------
[2004-02-04 14:18:36] genius_cse at yahoo dot com
Description:
------------
I am using:
PHP 4.3.4, J2SDK1.4.2_01, Apache 1.3 with CGI Module
Current php.ini configuration:
=======================================================
extension_dir = c:\php\extensions
extension=php_java.dll
[java]
java.class.path = "c:\php\extensions\php_java.jar; c:\myclasses\"
java.home = c:\j2sdk1.4.2_01\bin
java.library = c:\j2sdk1.4.2_01\jre\bin\server\jvm.dll
java.library.path = c:\php\extensions
========================================================
- the above c:\myclasses\ as my custom java class directory.
Reproduce code:
---------------
//SalesTax.java
import java.util.*;
import java.text.*;
public class SalesTax {
public String SalesTax(double price, double salesTax) {
double tax = price * salesTax;
NumberFormat numberFormatter;
numberFormatter = NumberFormat.getCurrencyInstance();
String priceOut = numberFormatter.format(price);
String taxOut = numberFormatter.format(tax);
numberFormatter = NumberFormat.getPercentInstance();
String salesTaxOut = numberFormatter.format(salesTax);
String str = "A sales Tax of " + salesTaxOut +
" on " + priceOut + " equals " + taxOut + ".";
return str;
}
}
===========================================================
in salestax.php calling :
$salesTax = new Java("SalesTax");
===========================================================
my SalesTax.class is in c:\classes as specified in java.class.path
Expected result:
----------------
Expected output will print out salesTaxOut, priceOut, taxOut values.
Actual result:
--------------
But i just got the following error message:
Warning: java.lang.ClassNotFoundException: SalesTax in c:\Program
Files\Apache Group\Apache\htdocs\myclasses\SalesTaxInterface.php on
line 21
Fatal error: Call to a member function on a non-object in c:\Program
Files\Apache Group\Apache\htdocs\myclasses\SalesTaxInterface.php on
line 28
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27151&edit=1