|
From: <php...@li...> - 2007-12-09 16:08:33
|
Hi,
I have problem to connect PHP with java application using PHP/java bridge. I am using XAMPP 1.6.4 and Tomcat addon. I have created a simple PHP file that instantiate Java class, like:
<?php
$system=new Java('java.lang.System');
?>
If I use php_java.jar and php_java.dll that comes with xampp 1.6.4 installation I got error message:
Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to load Java Library jvm.dll, error: The specified module could not be found. in C:\xampp\htdocs\example.php on line 2
However, phpInfo() gives the following information about Java
java.class.path C:\xampp\php\ext\php_java.jar C:\xampp\php\ext\php_java.jar
java.home C:\Program Files\Java\jdk1.6.0_02 C:\Program Files\Java\jdk1.6.0_02
java.library jvm.dll jvm.dll
java.library.path C:\php\ext C:\php\ext
My php.ini file Java module settings looks as follow
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[java]
java.home="C:\Program Files\Java\jdk1.6.0_02"
java.java="C:\Program Files\Java\jdk1.6.0_02\bin\javaw.exe"
java.class.path="C:\xampp\php\ext\php_java.jar"
java.library.path="C:\php\ext"
java.log_level=3
If I use php-java-bridge_3.2.1 I do not get any information about Java in phpInfo().
Is there any suggestion how to solve this problem?
Zoran
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
|
|
From: <php...@li...> - 2007-12-09 18:11:16
|
Hello!
php...@li... wrote:
Fatal error: java() [function.java]: Unable to load Java Library jvm.dll, error: The
Do you really want to load the jvm.dll into Apache? How should this work anyway, considering that Apache is multithreaded?
What about using RPC instead. For example:
<?php
require_once("java.inc");
echo Java("java.lang.System")->getProperties()
?>
Peter
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
|
|
From: <php...@li...> - 2007-12-10 09:52:03
|
Hi,
> I have problem to connect PHP with java application using PHP/java bridge.
[...]
> If I use php_java.jar and php_java.dll
these files do not belong to the PHP/Java Bridge.
Please install the PHP/Java Bridge as described in the INSTALL.J2EE document.
If you want to use the above files please report the bug to the project or vendor providing
php_java.jar/php_java.dll.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|
|
From: <php...@li...> - 2007-12-10 18:22:20
|
Hi,
>Please install the PHP/Java Bridge as described in the INSTALL.J2EE document.
I have installed PHP/Java Bridge. Its works fine with the provided examples (NumberGuess PHP), but not with my example that is deployed to apache:
<?php
if(!extension_loaded("java"))
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
$s = new Java("java.lang.String", "hello");
?>
It gives me the error:
Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to load Java Library C:\Program Files\Java\jdk1.6.0_02\jre\bin\server, error: The specified module could not be found. in C:\xampp\htdocs\example.php on line 7
If I start phpInfo() these values are available:
java.class.path no value no value java.home C:\Program Files\Java\jdk1.6.0_02 C:\Program Files\Java\jdk1.6.0_02 java.library jvm.dll jvm.dll java.library.path C:\php\ext C:\php\ext
php...@li... wrote:
Hi,
> I have problem to connect PHP with java application using PHP/java bridge.
[...]
> If I use php_java.jar and php_java.dll
these files do not belong to the PHP/Java Bridge.
Please install the PHP/Java Bridge as described in the INSTALL.J2EE document.
If you want to use the above files please report the bug to the project or vendor providing
php_java.jar/php_java.dll.
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
|
|
From: <php...@li...> - 2007-12-11 08:00:58
|
Hi
[Zend java extension ]
> It gives me the error:
>
> Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to load Java Library
I am sorry, but we don't support this extension.
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? www.yahoo.de/mail
|
|
From: <php...@li...> - 2007-12-11 03:50:01
|
My linux server has java from Free Software Foundation pre-installed in it. However some of the java class files that I am working with need Sun Java. So I downloaded Sun JDK and installed it on my server. I then installed php bridge 4.3.1a. However, my php/apache still points to the earlier installation of java. How and where do I change settings so that php/apache works with my Sun JDK? I have changed $PATH in /etc/profile, cshrc.login and everywhere.. so $PATH has the latest java version as the first directory now. Rajagopal Yadavalli winnou.com 99490.31262 "You must want to FLY so badly that you are willing to give up being a caterpillar" |
|
From: <php...@li...> - 2007-12-11 08:45:28
|
Hi,
> the earlier installation of java. How and where do I change settings so that
> php/apache works with my Sun JDK?
you could change /etc/php.d/java.ini as follows:
java.java_home=/usr/java/default
java.java =/usr/java/default/bin/java
> I have changed $PATH in /etc/profile, cshrc.login and everywhere.. so $PATH
RedHat and Debian support alternatives:
apropos alternatives
update-alternatives (8) - maintain symbolic links determining default commands
update-java-alternatives (8) - update alternatives for jre/sdk installations
Regards,
Jost Boekemeier
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|