Java is a very powerful programming tool, its extension library is also very useful, this tutorial, mainly on how to use PHP invoke powerful Java class library (classes). To facilitate your study, this tutorial will include Java installation and some basic examples.
Installation under Windows
Step One: Install the JDK, it's very easy, you just have to install it all the way to the carriage. Then do the following steps.
Add under Win9x: "path=%path%; C:jdk1.2.2in "to the Autoexec.bat file
Add under NT "; c:jdk1.2.2in "to the environment variable.
This step is very important so that PHP can correctly find the Java class that needs to be invoked.
Add Extension=php_java.dll to PHP.ini
And in [Java], set the Java.class.path to point to Php_java.jar, and if you use the new Java class, you should also deposit this path, and in this example we use the C:myclasses directory.
Step three: Test the environment, create the following PHP file:
<?php
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
[email protected]
and provide relevant evidence. A staff member will contact you within 5 working days.