Home  >  Article  >  Backend Development  >  Can I run PHP and Java at the same time by installing JDK?

Can I run PHP and Java at the same time by installing JDK?

WBOY
WBOYOriginal
2016-08-08 09:33:341501browse

Can I run PHP and Java at the same time by installing JDK?

Recently, a friend of hivemind.co.uk published an article about php to show you how to use the PHP-java bridge. The original title of this article is "How to Bridge PHP and Java for Powerful Web Solutions" (How to connect PHP and Java to create more powerful Web solutions).

This title more accurately describes what the article is about. But I am skeptical about the suggestion in the article to create an autoexec.bat file to set the PHP path and Java class path. Although this is technically correct and you can do it.

Besides that, another suggestion is to create JDK and then run it. This setting will be very convenient. (Since it is based on Windows, no restarting is required.) Once you have the JDK installed, you can quickly create a "hello world" class and use it in PHP. Anyway, for those who want to know how to run PHP and Java at the same time, you can read this article.

The PHP code here is so simple and straightforward. This is not OOP. But you can use OOP a lot in Java. Here I would like to remind the author: If you need it, PHP can also provide the same OOP-based functions. Finally, I would like to explain that if you are considering using Java in PHP, you can continue reading this article and carefully look at the examples it provides.

The above introduces whether installing JDK can run PHP and Java at the same time? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn