Execute java GUI program from external website

307 views Asked by At

maybe what I'm asking is difficult to do or even ridiculous, but I'll give it a try anyway.

I have a typical PHP website, with a products list. And I have a Java application which manages the products (CRUD). In that application I have a JDialog that pops up when I select to edit a product.

My question is: ¿Is there a way, no matter how difficult to implement, in which I click an "Edit product" button on the webpage and the java application JDialog pops up to edit that product?

Thank you.

1

There are 1 answers

1
Karsten Daemen On BEST ANSWER

I'm no expert on the matter but take a look at custom protocol handlers.

Define a custom protocol myapp:\\ that you can use on your web page in hrefs like:

<a href="myapp:\\open-product1">Open Product 1</a>

Then on OS level you need to specify how this protocol should be handled. (In your case that will be to run your Java program with the correct arguments to open product1). The installation of your Java program should make the necessary changes to the OS in order to correctly handle this custom protocol.

Take a look at this site for more information.