• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Intersting Question

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
I hope you can Help me out of this.
Well I am making a kinda a small Software for a Cyber Cafe.
The requirement is that Internet Explorer Shortcut shouldnt be present on the desktop.
I should have a java application which has a frame.
The Frame has a button on which when I click starts Internet Explorer.I Used Runtime Object and Process class to perform this operation,which works perfectly.
As soon as Internet Explorer Starts I have a user defined timer class which starts the time in backwards order.thats is 60 min--59 min- 58 min---- and so on.
Now my main problem is that as soon as the time reaches 0 minutes,i want all the Internet Explorer windows to close.
Is this possible,it should be I suppose Please Help me.
Thanks
 
anand chawla
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Common Moderators,
Atleast I expect you to help me.
Please help me
 
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This should work for you --
<pre>
class Rage{
public static void main(String ka[]){
Runtime r = Runtime.getRuntime();
Process p = null;
try
{
p = r.exec("C:/Program Files/Internet Explorer/IEXPLORE");
Thread.sleep(8000);
p.destroy();
}
catch (Exception e)
{
System.out.println("Error : "+e);
}
}
};
</pre>
Hope that helps
Ashish
[This message has been edited by Ashish Hareet (edited July 27, 2001).]
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
anand,
I'm going to move this to Java Intermediate. It's not related to Certification Study.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic