Please Help!!!!!!!
I opened a file(del.txt) in wordpad using following code in java
try{
Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " +"del.txt");
}catch(Exception e){}
Can anyone add code for notify whenever uses closed the wordpad instance of that file.
# 2
Sorry to say i tried this method but it is not seem to wok.
I tried it as
try{
Process p = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "del.txt");
p.waitFor();
}catch(Exception e){
System.out.println("EXIT.");
}
It is not working. Please suggest something else.
Thanking you
# 5
> It will work fine if ".txt" files are associated with
> wordpad
> but if it is associated with other (e.g. notepad)
> then it throws exception
>
> that why i was using "rundll32
> url.dll,FileProtocolHandler " + "del.txt"
rundll32 "launches" the application in background, and returns immediately.
So if you use rundll32, Java CANNOT know when the application closes.
You simply CANNOT do it.