Results 1 to 4 of 4
  1. #1
    Pierced1 is offline Member
    Join Date
    Feb 2009
    Posts
    12
    Rep Power
    0

    Question program interaction possible?

    I'm wondering how (and if it's possible) to "interact" with other program-windows(possibly none-java programs) through java.

    Lets say I'm running a program who has an window/GUI open and i want to get my hands on the info that a server sends to that window/GUI. My thought would be to have a java-program that "hocks" to that window by clicking on it or something rather then that i check what port it's using and there "hijacking" the info.

    Any ideas or other better solutions to this? What i really want to know is how i interact/read info from other programs that are not build to interact with this program.

    Big thanks for any help.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Java is built to be able to be run on many different pieces of hardware and multiple operating systems, and for this to succeed, you loose the ability to program close to either the hardware or the OS. So the short answer here is: Java is not the tool you want to use for doing something like this. Yes, it may be possible with some fancy JNI code together with C++ code, but if you're going to do this, you might as well code the whole thing in C++ or C#.

  3. #3
    Pierced1 is offline Member
    Join Date
    Feb 2009
    Posts
    12
    Rep Power
    0

    Default

    That was pretty much my fear, since I'm only able to code in Java it's kind of a problem =).

    Is it possible to listen to the right port then and "read" the data there?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    Yes, programs can communicate via sockets, but the other program has to be written to do this. You'll not be able to easily use Java for instance as a driver for say MS Word.

Similar Threads

  1. Execute A program from a Program!
    By Moncleared in forum Advanced Java
    Replies: 2
    Last Post: 02-22-2009, 04:17 PM
  2. Executing a program within a program
    By gibsonrocker800 in forum New To Java
    Replies: 5
    Last Post: 05-12-2008, 08:24 AM
  3. Replies: 0
    Last Post: 04-04-2008, 02:40 PM
  4. Object Interaction
    By Jinxes in forum New To Java
    Replies: 1
    Last Post: 12-03-2007, 12:05 AM
  5. Replies: 0
    Last Post: 10-04-2007, 09:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •