| Author |
MDI file close.
|
Sebin George
Greenhorn
Joined: Sep 17, 2004
Posts: 2
|
|
How can I know, is a file closed from a Multiple Document Interface(MDI)? My idea is lock the file for that MDI and check to write that file from another java thread. If it is writable that file is been closed. For that. I am starting a process using the Runtime. for example: cmdArray[0]="C:\Program Files\TextPad 4\TextPad.exe"; cmdArray[1]="test.txt"; Process process=runtime.exec(cmdArray); Now I want to give the FileLock to this process. Any way for doint that? If i got any native code(windows) then also i'm happy.
|
 |
Stefan Wagner
Ranch Hand
Joined: Jun 02, 2003
Posts: 1923
|
|
I don't think so (give the Runtime-process the lock). But if you define a class as implementing Runnable, and that class has two goals: a) handle the lock b) start the Runtime-process. would that solve your problem?
|
http://home.arcor.de/hirnstrom/bewerbung
|
 |
Sebin George
Greenhorn
Joined: Sep 17, 2004
Posts: 2
|
|
|
with the thread lock how can I know an MDI is close? I don't find any logic for that..
|
 |
 |
|
|
subject: MDI file close.
|
|
|