Solved

PHP - Java

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Google Maps API and PHP 25 49
Wordpress Security 29 49
Echo Multiple values from multiple records 19 44
issue with DB import 1 19
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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 …

830 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