1

How do I connect my Java Desktop application with a PHP Web Application. Any example codes and technologies I should know of? I just want a simple implementation (its a school project and I don't have much time to perfect it)

On the web side, perhaps I can have a REST-ful API. But what about the Java Desktop side (I'm more of a web developer). How can I pull & pull data from my Java app?

1
  • I have the same issue? what did you use for this purpose?
    – Java Man
    Nov 11, 2013 at 7:05

1 Answer 1

2

You can create an http-endpoint in the desktop app as well. For instance you can embed a simple servlet container like jetty.

Once you have a servlet container, you can use something like Jersey to write a REST API (or you can just use the Servlet API).

Another option is to create a ServerSocket in the java app, and connect to it from the php app.

There is also a php-java bridge, if you want to get really fancy ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.