Pages: 12Next
Current Page: 1 of 2
Java Bridge in wamp server
Posted by: Ranganathan (65.57.245.---)
Date: September 11, 2007 08:43AM

Hi,

I have to create and use Java Bridge in my PHP pages, where I can create and call the Java Objects from the PHP. I tried editing the PHP.ini file keeping
[java] module and the other path. When I restart my server and run the Java application,
I am getting this error:

Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to load Java Library jvm.dll, error

Can anyone help me on this? If possible gimme an example.

:-)

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: September 11, 2007 09:10PM

wamp does not come with support for java so you will have to install and configure everything yourself.



CyberSpatium
----------------------
WAMP English Forum Admin

I have WAMP5 working with (for development use only):
Windows Vista Ultimate x64 (64 bit)
Kaspersky Internet Security Suite 7.0.x
Spyware Terminater 2.x
CounterSpy 2.5.x


Need help? Check out my WAMP User Manual/Guide here!


Cellular Phone Deals - The Best on the Net! - FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a FREE cellular phone with FREE shipping!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Clarify Loans
Mortgage and Home Loan Advice


LaxGo Web Directory
Powerful human edited web directory of quality, spam-free sites organized via a comprehensive category structure.

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: sirshurf (---.red.bezeqint.net)
Date: November 20, 2007 10:55AM

You are not the only one with this problem... does anybody know any way to fix it?

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: thuyain (---.singnet.com.sg)
Date: November 27, 2007 06:21AM

Hello,

I would like to explain some configuration to run PHP/Java Bridge in Wamp Server. Whenever you tried to run, you will get the following error message which is because of version confict between PHP and PHP\JavaBridge.

==========================
Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to load Java Library jvm.dll, error
==========================

Therefore, I advise you to use the php version to 5.1.0 and php-java-bridge_3.2.1 which can be downloaded from <a href="[sourceforge.net];.


Once you have downloaded, follow the instruction below:

1. extract the zip file and then you will see ext folder inside
2. copy (ext\JavaBridge.jar, ext\php_java.dll) files and paste to C:\wamp\bin\php\php5.1.0\ext
3. restart the wamp server
4. run the following code

============================

<?php

// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');

// demonstrate property access
echo 'Java version=' . $system->getProperty('java.version') . '<br />';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' <br />';

// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz"winking smiley;

echo $formatter->format(new Java('java.util.Date'));
?>

==================================

You will see the following result successfully:

=================

Java version=1.6.0_01
Java vendor=Sun Microsystems Inc.
OS=Windows Vista 6.0 on x86
Tuesday, November 27, 2007 at 12:52:51 PM Singapore Time

===================

Enjoy it,

Thuyain (Myanmar)

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: thuyain (---.singnet.com.sg)
Date: November 27, 2007 06:31AM

P.S.

open the php.ini file and add the new extension, i.e.

extension=php_java.dll

Thuyain (Myanmar)

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (---.adsl196-8.iam.net.ma)
Date: February 20, 2008 01:44PM

hello, please can anyone send me php-java-bridge_3.2.1 for windows ? i don't find it. thank you

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: govindero (220.227.190.---)
Date: February 20, 2008 05:57PM

hai,
you download it from link

"[sourceforge.net];

i am also try to integrate php with java but i got error

Fatal error: java() [<a href='function.java'>function.java</a>]: Unable to load Java Library jvm.dll, error when

using php_java_bridge version 5 and then saw abve post it advice to use bridge version 3.2.1 and now i am in

integrating process.....


if you success in integrating php and java then please give the procedure to integrate..........


GOOD LUCK

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (41.248.36.---)
Date: February 20, 2008 10:36PM

Hi govindero thanks for replying, the link is for debian version I need the windows one i got the same error when i use version 5 that's why i search php-java-bridge_3.2.1_j2ee

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: govindero (220.227.190.---)
Date: February 21, 2008 08:35AM

hi dijaplus

did you get any result for integrating php and java ?

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (---.adsl196-8.iam.net.ma)
Date: February 21, 2008 10:44AM

Not yet sad smiley but I must find a solution... I'll tell you when I get it. I hope you do the same winking smiley

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: FredX (---.w193-251.abo.wanadoo.fr)
Date: February 21, 2008 11:20AM

I've the same problem...
Just an explanation :
Are you sure that JavaBridge.jar is necessary for using php_java.dll.
I read on the web that's another system for using php and java working together.
But it's two differents solutions.
For me i haven't the same error than you :
Unable to load Java Library jvm.dll, error
but httpd.exe crashed

My php.ini file if this can help you :
[java]
java.class.path = "C:\wamp\bin\php\php5.2.5\ext\php_java.jar;C:\Program Files\Java\jdk1.6.0_04\jre\lib"
java.library = "C:\Program Files\Java\jdk1.6.0_04\jre\bin\server\jvm.dll"
java.home = "C:\Program Files\Java\jdk1.6.0_04\bin"
java.library.path = "C:\wamp\bin\php\php5.2.5\ext;C:\Program Files\Java\jdk1.6.0_04\jre\lib"

I think if you have the good java.library that's work.

I read that you must have the jdk and not only the jre

May be this can help you

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (---.adsl196-8.iam.net.ma)
Date: February 21, 2008 12:18PM

Hello Fredx I did the same ! i get Unable to load Java Library jvm.dll when i don't add java.library if not i get error with apache
pleaaaaaaaaaaaaaaaaaase help

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (---.adsl196-10.iam.net.ma)
Date: February 23, 2008 02:45AM

Hello !
It works for me now... I executed test.bat in javabridge folder it generate a php.ini file and folder with php_java.dll & javabridge.jar those are the good extensions, copy the extensions in the folder ext of php and the lines in the generated php.ini to your own php.ini
good luck

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: govindero (220.227.190.---)
Date: February 23, 2008 07:08AM

hai dijaplus,

where you download javabridge ?

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (---.adsl196-9.iam.net.ma)
Date: February 23, 2008 01:18PM


Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: govindero (220.227.190.---)
Date: February 25, 2008 11:30AM

hai dijaplus,

i downloaded that file and placed it in extension folder as you told but still i had problem with it

fatal error.i used wamp version 2.0a (latest version ) which is downloaded from link

[www.wampserver.com] that version php5.2.4 is used ,i dont know it is suitable to integrate java.


please tell me

which wamp version are you used and where you downloaded ? and

please tell me steps simply as you follwed to integrate the php with java and is there any changes in java

side(C:\Program Files\Java\jdk1.5.0_05) ?

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (41.248.25.---)
Date: February 25, 2008 06:14PM

I use wamp1.6 and jdk 1.5.0_07, you must also desable sapi module in httpd.conf that's all
tell me what you get.

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: FredX (---.w193-251.abo.wanadoo.fr)
Date: March 04, 2008 03:07PM

Dijaplus, un grand MERCI !!!
That's work !
Par contre dans les docs il est dit que cette facon de fonctionner est 10 fois moins rapide. Je m'en contenterai si ça fonctionne.

Dijaplus a great THANK'S !!!
Ca fonctionne !
But in the documentation it's indicate that's is less efficient than others methods. But ot's works !

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: dijaplus (---.adsl196-8.iam.net.ma)
Date: March 05, 2008 11:07AM

Bonjour FredX oui ça marche bien avec wamp1.6 ou bien les versions d'apache et php qui sont utilisé avec wamp1.6 çàd apache 2.0.xx et php 5.1.x, mais avec php 5.2.x ça ne marche pas... j'essaye tjrs de trouver une solution pck je veux pas que cette histoire de versions me bloque après.. tu as parlé de documentation, laquelle ?
bon courage FredX

Options: ReplyQuote
Re: Java Bridge in wamp server
Posted by: FredX (---.w193-251.abo.wanadoo.fr)
Date: March 06, 2008 11:21AM

Dans le fichier README associé au JavaBridge dont tu as fourni le lien il est indiqué :

NOTE: The folder "java" contains a pure PHP implementation of the
PHP/Java Bridge. It is currently 10 times slower than the C based
implementation but easier to install. See the java/README for
details. The following describes the C based implementation.

Sinon j'ai de gros problèmes avec cette version car je n'arrive pas a modifier le classpath qui reste toujours à c:/wamp/bin/php/php5.1.6/ext/JavaBridge.jar bien que je l'ai modifié dans le php.ini.

A priori le classpath est ensuite modifié par le JavaBridge et je ne sais pas comment rajouter mon classpath à moi. Donc j'arrive a faire fonctionner des fonctions java incluses d'origine mais pas les sources java autres. Aurais tu des infos la dessus ??

Sinon oui comme toi j'ai été obligé de descendre en version d'Apache et de PHP pour que cela fonctionne. Heureusement sous WAMP ce n'est pas trop compliqué.

Merci...

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


Sorry, only registered users may post in this forum.