0

I'm trying to make a Unicode based virtual keyboard using java to write on an already running external program.

i.e. I don't want to start the program. It should be already running. My java code will be running on the background, generating output and send it to notepad or browser.

What is the best way to accomplish this? Any link/suggestion will be appreciated. Thanks in advance!!

  • 1
    Use sockets for this kind of simple and fast communication. See [java.net](http://docs.oracle.com/javase/6/docs/api/java/net/package-summary.html). But this supposes you write both ends. Do you want to connect any kind of program yet existing ? – Denys Séguret Jun 22 '12 at 09:43
  • 1
    If the program is already running, you either need the explicit help of the already running program or you need to have the operating system help you. – Thorbjørn Ravn Andersen Jun 22 '12 at 09:48
  • I want to connect any kind of running program having text field. I know very little about socket. Have to learn more. @dystroy – Tawfiqur Rahman Jun 22 '12 at 10:40
  • Didn't get your answer. How can I have the help of OS? Would you explain a more? @ThorbjørnRavnAndersen – Tawfiqur Rahman Jun 22 '12 at 10:41
  • If you need "any kind" you _must_ have the operating system to help you do it. This makes it a non-Java problem. I would suggest you open a new question directly on the platform (like Linux) you target. – Thorbjørn Ravn Andersen Jun 22 '12 at 10:42
  • To communicate via socket I need to know the port number of the running program eg. notepad,ms word. How can I get the port number? @dystroy – Tawfiqur Rahman Jun 22 '12 at 12:52
  • Most programs don't open a socket. They have no reason to do so. You can't connect to Notepad this way. – Denys Séguret Jun 22 '12 at 12:52

0 Answers0