java and 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
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

java and php

Post by pelegk2 »

i want to call java from php:
$salesTax = new Java("SalesTax");

// Don't forget to typecast in order to
// conform with the Java method specifications.
$price=100;
$tax=18;
$price = (double) $price;
$tax = (double) $tax;

print $salesTax->SalesTax($price, $tax);

Code: Select all

but i get this error:
їcode]Fatal error: Unable to load Java Library C:\PHP\javaclass, error: The specified module could not be found. in C:\Program Files\Apache Group\Apache2\htdocs\test\java2.php on line 3
and i have compiled the class and its working ok!
what to do?
this is my php.ini :

Code: Select all

їJava]
java.class.path = "C:\PHP\extensions";
java.home = "C:\j2sdk1.4.1_06\bin";
java.library = "C:\PHP\javaclass";
java.library.path = .\
Post Reply