Solved

PHP - Java

Posted on 2001-07-20
2
215 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now