How to call ActiveX or PC program from an applet?

Hi,

I am newbie to Java and ActiveX.

I have a Windows PC program that need to be invoked from an applet which runs in the JSP web page in Internet Explorer in Windows 2000. The applet needs to pass information to the PC program which in turn returns the result back to the applet or web page where the applet runs. Do you know how can I do it?

I have thought of this: write a Activex that invoke the PC program, and use Javascript to communicate between the Applet and ActiveX. Is it possible? Any better way? What are the ways of communication between ActiveX and Applet? Can they share the HTTP session to pass and receive paramters instead of Javascript?

Or if I should directly convert the PC program to ActiveX. But still the issue is how to communicate between Applet and ActiveX?

Thank you.

[835 byte] By [khsheha] at [2007-10-3 4:49:50]
# 1

I wouldn't use ActiveX for that as Java has java.lang.Runtime class where you can use various exec(...) methods:

Process proc = Runtime.getRuntime().exec("[i]<your_command>[/i]");

Use the returned Process object for input - output to the external executable.

attilaracza at 2007-7-14 22:54:23 > top of Java-index,Desktop,Core GUI APIs...