Integrating Java and PHP in WebSphere Smash

Source: Internet
Author: User
Tags exception handling php and

Introduction

This article explains how to use Java Bridge to access Java classes from PHP. It discusses how to invoke Java methods and access fields (instance and static fields). Exception handling and type conversions between PHP and Java are also discussed.

ZSL, WebSphere SMash, and Apache Lucene

For a real example, this step-by-step article describes the creation of a simple search engine written in PHP that uses Apache Lucene to establish a file index and search. Apache Lucene is a high-performance fully functional text search engine library, full use of Java writing. This is a technology that works well for many applications that require full-text search.

ZSL use Apache LUCENE.ZSL in the WebSphere sMash application that it writes? Want to improve information sharing between their developers. To solve this problem, they created mashups to index source code and document libraries (PDF, PowerPoint, Word, Excel, and many other formats). This application provides the ability to quickly and easily access code snippets from across the enterprise.

Creating Applications in WebSphere SMash

The first step is to create a new project in Eclipse:

1. Select File-> New-> Project ... and expand the Zero directory in the dialog box.

2. Select WebSphere sMash PHP application and click Next, as shown in Figure 1.

3. Name the project (for example, Myjavaproject) and click Finish. Your project is now created.

Figure 1. Create New WebSphere SMash Project dialog box

Contact Us

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.