Solved

PHP - Java

Posted on 2001-07-20
2
209 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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
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 is …
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 create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

10 Experts available now in Live!

Get 1:1 Help Now