Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP - Java

Posted on 2001-07-20
2
Medium Priority
?
230 Views
Last Modified: 2012-08-14
Hello,
  I am using php 4.06 on Windows NT 4.0. My problem is whenever I want to use Java in PHP following error is displayed:

////////////////////
Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in E:\WWWROOT\PHP\JVER.PHP on line 4
//////////////////

I followed all the steps to necessary to invoke java but I am unable to do it. This problem has been faced by many like me and I have found no solution to it.
Please tell me what are the steps needed to solve this problem and what should be settings in php.ini file.

Sukhwinder Singh
0
Comment
Question by:Sukhwinder Singh
2 Comments
 
LVL 4

Accepted Solution

by:
ykf2000 earned 150 total points
ID: 6304111
Hi I think you need to do some setting on your php.ini. PHP need to know where is your Java Extension installed. Here is an example of settings.

http://zez.org/article/articleview/26/
0
 

Author Comment

by:Sukhwinder Singh
ID: 6305456
Hello,
 Thanks for your help even though I had already read that readme file that was provided eariler with java extension as mentioned in that article. But these days php_java.dll is present in extensions directory and isn't available as separate extension.

But I have found solution by trial and error. I wanted to write this because I thought it may help others like me.

My problem was that in php.ini there were four lines under Java Section:

///////////////////////////////////////////
extension=php_java
[Java]
java.class.path = c:\php\java\php_java.jar
java.home = d:\jdk1.3
java.library = d:\jdk1.3\jre\bin\hotspot\jvm.dll
java.library.path=C:\php\extensions
//////////////////////////////////////////

To solve this problem I had to remove fourth line under [Java] section.
So to run java from php we need these settings in php.ini:

///////////////////////////////////////
extension=php_java
[Java]
java.class.path = c:\php\java\php_java.jar
java.home = d:\jdk1.3
java.library = d:\jdk1.3\jre\bin\hotspot\jvm.dll
//////////////////////////////////////////////
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question