0

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.

5
  • the best way i think is a browser extension Commented Jun 16, 2015 at 13:59
  • The short answer is no. The long answer is if you can modify the Java application, allow it to support XML-RPC calls (or some way so that your PHP application can communicate with your Java application) Commented Jun 16, 2015 at 14:00
  • @ChrisForrence Yes, you can. Make it an applet, then you can call what you need Java side from JavaScript. docs.oracle.com/javase/tutorial/deployment/applet/… Commented Jun 16, 2015 at 14:12
  • 1
    Correct, but the problem with Applets is that it's deprecated technology ... latest chrome doesn't support it anymore for instance. Commented Jun 16, 2015 at 14:17
  • 1
    If the java application is simply a CRUD application I see no reason why you wouldn't be able to do it just a PHP-only backend. Commented Jun 16, 2015 at 17:06

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I think that's what I need, unfortunatelly I can't make it work, and every guide I've read talks about web based protocols and not protocols to open desktop applications

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.