File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to refer a child window in a MDI application?

 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a Multiple Document Interface (MDI) application written in FORTRAN. It has two child windows, one for displaying some data and another for displaying a trend (graphs).

My problem is I will be knowing only the PID of the above mentioned process from Java end.

How to refer the child window which is displaying data and read the data from it using Java??
I did implemented the above mentioned requirement with normal console application (with no child windows). But it is a window based MDI application now.

Please help.
[ October 13, 2008: Message edited by: Praveen Kumar Jayaram ]
 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please someone help for this problem.
 
Rob Spoor
Sheriff
Pie
Posts: 20368
43
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there are many people who know any answer to this problem. I certainly don't.
 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you think is that possible to implement anyway??
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to do a screen scrape? Try google with "screen scraping java".

Have a look at this link as well.
 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

I am not doing screen scraping.
Actually the process prints out some numbers and text onto screen. I have to read the data printed by the process on the screen and apply some bussiness logic on that. This was simple for a console application by using Java's Process class and getting the input stream of the process.

But the present app is MDI, I am not getting how to point the child window to read the data just by knowing the parent window process id.
Can I track the threads (child windows) inside the MDI app?

Any suggestion for this?
Thanks in advance
[ October 15, 2008: Message edited by: Praveen Kumar Jayaram ]
 
Matteo Di Furia
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if what you are trying to do is possible at all, but if I were you I'd look for some sort of interaction between Fortran and Java (which is surely possible), then I'd check if MDI application has some sort of methods to get/export data somehow (something like public interfaces to external input/output). I highly doubt you can get some data simply starting from the PID of the application process (it would be quite worrying, if you ask to me), although of course I'm not completely sure on this.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess there isn't a platform-independent way to get a PID. So my first question is, what is your platform?

Linux, MacOs, Windows?

Anyhow wouldn't that knowledge enable me to help you further.
 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying friends.
I am working on Windows XP, Service Pack 2.
 
g Peshone
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Store the data in DB, create a temp �db� on the fly, and then extract the data into Java with Java.
 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
We are not using any DB here.
Anything like IPC mechanism or memory map possible?
 
David Balažic
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use pipes.
Or simply temporary files.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic