This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

How to read windows?

904094
904094 Member Posts: 11
edited Apr 26, 2012 12:14PM in Abstract Window Toolkit (AWT)
Hi,
I am not sure whether this is the right place to put out this question, but I couldn't find any relevant place to put this out.

How can I read the general windows which open on my computer using Java? I am not talking about AWT or Swing window but let's say a notepad/dialog box of windows is open at my machine & I want my java program to read the notepad or a dialogue box which is controlled by windows.

Any thoughts?

Thanks,
Riha.

Answers

  • DrClap
    DrClap Member Posts: 25,479
    You can't use Java to steal information from other applications. At least not pure Java. You might be able to do it by having Java call some operating-system API which can access the windows of other applications.

    However this is the sort of thing typically done by malware. What's driving your need to spy on other applications?
  • morgalr
    morgalr Member Posts: 457
    901091 wrote:
    ...I want my java program to read the notepad or a dialogue box which is controlled by windows.

    Any thoughts?
    Sure, don't use Java to do it. Windows has a host of products designed specifically to interoperate with Windows products--take advantage of them, or get really good at JNI if you must use Java.
This discussion has been closed.