Stefan
Stefan

Reputation: 2194

Integrating MySQL + Webserver + PHP in Java Application

What's the best way to integrate a MySQL Database (no SQLite) and a Webserver like Apache with PHP functionality into a Java Desktop Application? I need to be able to access the Database from Java and the webserver via a webbrowser, PHP is querying the same MYSQL Database as Java. I thought of somehow packaging XAMPP in the Application Installer and then call the specific start batch files from Java but that seems to be kind of a hackish way to me. How is something like this typically done?

Thanks in advance,

Stefan

Upvotes: 3

Views: 542

Answers (2)

znurgl
znurgl

Reputation: 1097

It's a bit strange idea. However could be a solution if you construct an installer solution. For example: http://www.advancedinstaller.com/java.html

Upvotes: 0

Kyros
Kyros

Reputation: 512

Replace Apache with Jetty which is an embeddable web server built with java. Jetty can serve php pages if it's linked to the php executable. MySQL is not a great option for this at all - if you need a portable high powered solution use MongoDB which you can simply package and run alongside your application.

Upvotes: 1

Related Questions