Exploration of calling JavaBean in PHP4_PHP Tutorial
First of all, let me declare that when I wrote this article, I didn’t understand this. I just downloaded the example from php.net and tried it, and it was under the win2000 apache php4p12 configuration. The specific steps are as follows: 1. Install the JVM ( java virtual machine) (I use jdk122)
Of course, you don’t have to use jdk122, or even jdk, use other ones, such as:
JVM=Kaffe 1.0.4 (as delivered with OS ), OS=Redhat Linux 6.1
JVM=Kaffe 1.0.5 (built from source), OS=Redhat Linux 6.1
JVM=IBM 1.1.8, OS=Redhat Linux 6.1
JVM=Blackdown 1.2. 2 RC4, OS=Redhat Linux 6.1
JVM=Sun JDK 1.1.8, OS=Windows NT 4/win2000
However, here I will only talk about my approach, I have not tried others, don’t ask me , what should be paid special attention to here is that according to the description of the official PHP website, jdk122 linux is not supported
2. Set environment variables
In win2000, go to "My Computer"->"Properties"->"Advanced "->"Environment variable"
Set JAVA_HOME
to: jdk path. For example, if my jdk122 is installed under e:jspjdk122, then set it to e:jspjdk122
3. Download relevant files (if you If not)
Download address: http://www.php.net/downloads.php
I downloaded: php-4.0.1-Win32-java-jdk122.zip file, there are several examples after decompression , and there are: php_java.dll and php_java.jar files.
4. Configure the php.ini file
[java]
java.class.path=E:PHP4php_java.jar
java.home= E:jspjdk122 in
extension=php_java.dll
java.library.path=E:PHP4ext
java.library=E:Program FilesJavaSoftJRE1.2 inclassicjvm.dll
The above is my configuration , to explain, my php4 is in the e:php4 directory, and all my extended dll files are placed in the e:php4ext directory. Of course, php_java.dll should be copied to this directory. Finally, make sure you have jvm under win2000. .dll file, if not, just install visual studio (I installed VC 6, so I don’t need to think about it)
5. Test
Run phpinfo() and you can see "java" , if not, it means you have not succeeded. It is displayed as follows:
java
Directive Local Value Master Value
java.class.path
E:PHP4php_java.jar E:PHP4php_java.jar
java.home
E:jspjdk122 in E:jspjdk122 in
java.library
E:Program FilesJavaSoftJRE1.2 inclassicjvm.dll jvm.dll
java.library.path
E :PHP4ext no value
6. Test example
I am using the example included in the downloaded file: jver.php. If successful, there will be the following results:
Java version=1.2.2
Java vendor=Sun Microsystems Inc.
OS=Windows NT 5.0 on x86
Wednesday, July 19, 2000 at 10:32:53 PM GMT 08:00

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to set up keyboard startup on Gigabyte's motherboard. First, if it needs to support keyboard startup, it must be a PS2 keyboard! ! The setting steps are as follows: Step 1: Press Del or F2 to enter the BIOS after booting, and go to the Advanced (Advanced) mode of the BIOS. Ordinary motherboards enter the EZ (Easy) mode of the motherboard by default. You need to press F7 to switch to the Advanced mode. ROG series motherboards enter the BIOS by default. Advanced mode (we use Simplified Chinese to demonstrate) Step 2: Select to - [Advanced] - [Advanced Power Management (APM)] Step 3: Find the option [Wake up by PS2 keyboard] Step 4: This option The default is Disabled. After pulling down, you can see three different setting options, namely press [space bar] to turn on the computer, press group

1. Processor When choosing a computer configuration, the processor is one of the most important components. For playing games like CS, the performance of the processor directly affects the smoothness and response speed of the game. It is recommended to choose Intel Core i5 or i7 series processors because they have powerful multi-core processing capabilities and high frequencies, and can easily cope with the high requirements of CS. 2. Graphics card Graphics card is one of the important factors in game performance. For shooting games such as CS, the performance of the graphics card directly affects the clarity and smoothness of the game screen. It is recommended to choose NVIDIA GeForce GTX series or AMD Radeon RX series graphics cards. They have excellent graphics processing capabilities and high frame rate output, and can provide a better gaming experience. 3. Memory power

How to use Python to call Baidu Map API to implement geographical location query function? With the development of the Internet, the acquisition and utilization of geographical location information is becoming more and more important. Baidu Maps is a very common and practical map application that provides a wealth of geographical location query services. This article will introduce how to use Python to call Baidu Map API to implement the geographical location query function, and attach a code example. Apply for a Baidu Map developer account and application First, you need to have a Baidu Map developer account and create an application. Log in

SPDIFOUT connection line sequence on the motherboard. Recently, I encountered a problem regarding the wiring sequence of the wires. I checked online. Some information says that 1, 2, and 4 correspond to out, +5V, and ground; while other information says that 1, 2, and 4 correspond to out, ground, and +5V. The best way is to check your motherboard manual. If you can't find the manual, you can use a multimeter to measure it. Find the ground first, then you can determine the order of the rest of the wiring. How to connect motherboard VDG wiring When connecting the VDG wiring of the motherboard, you need to plug one end of the VGA cable into the VGA interface of the monitor and the other end into the VGA interface of the computer's graphics card. Please be careful not to plug it into the motherboard's VGA port. Once connected, you can

Glodon Software is a software company focusing on the field of building informatization. Its products are widely used in all aspects of architectural design, construction, and operation. Due to the complex functions and large data volume of Glodon software, it requires high computer configuration. This article will elaborate on the computer configuration recommendations of Glodon Software from many aspects to help readers choose a suitable computer configuration processor. Glodon Software requires a large amount of data calculation and processing when performing architectural design, simulation and other operations. Therefore, the requirements for the processor are higher. It is recommended to choose a multi-core, high-frequency processor, such as Intel i7 series or AMD Ryzen series. These processors have strong computing power and multi-thread processing capabilities, and can better meet the needs of Glodon software. Memory Memory is affecting computing

Wedge We know that objects are created in two main ways, one is through Python/CAPI, and the other is by calling a type object. For instance objects of built-in types, both methods are supported. For example, lists can be created through [] or list(). The former is Python/CAPI and the latter is a calling type object. But for instance objects of custom classes, we can only create them by calling type objects. If an object can be called, then the object is callable, otherwise it is not callable. Determining whether an object is callable depends on whether a method is defined in its corresponding type object. like

PHP camera calling skills: How to switch between multiple cameras. Camera applications have become an important part of many web applications, such as video conferencing, real-time monitoring, etc. In PHP, we can use various technologies to call and operate the camera. This article will focus on how to implement multi-camera switching and provide some sample code to help readers better understand. Basics of camera calling In PHP, we can call the camera by calling the JavaScript API. Specifically, we

How to solve the problem of accessing and calling external resources in PHP development requires specific code examples. In PHP development, we often encounter situations where we need to access and call external resources, such as API interfaces, third-party libraries or other server resources. When dealing with these external resources, we need to consider how to access and call safely while ensuring performance and reliability. This article describes several common solutions and provides corresponding code examples. 1. Use the curl library to call external resources. Curl is a very powerful open source library.
