Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

how can i control the process i create?

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a applet ,i create a Process to control the word,like these:
p = Runtime.getRuntime().exec("winWord "+fileName);
int processExit=0;
try {
processExit=p.waitFor();
if(processExit==0) {
...code to do
}
}
if the user close the word which i create ,i can catch the Exit event,so i can do somthing else.
but if the user has opened a word, then when the new word create ,the Exit event arise before the user close the new word i
create.
how can i avoid all these happen???
anyone can help me ???
 
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic