• 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

start a program at window startup

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can i create the code for start the program at window startup

if anybody can help me then help me buddy i am leaner
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean at "Windows" startup? Since you posted this in the servlets forum I'm assuming you want this code to run in a servlet container for some reason. The only way to do that would be to put the code in a servlet context listener of your web app, and set up the servlet container to run at startup time. Tomcat can be installed as a Windows service, and a Windows service can be set to run at startup, so that should do the trick.
 
Ranch Hand
Posts: 46
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi The question is not clear what you want exactly window start up means web application or stand alone application if its web use onLoad() java script function.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

prasad guna wrote:if its web use onLoad() java script function.


That is very unlikely to be the solution - it not only assumes that a servlet container will start, but also that a web browser will start and load a particular page after the servlet container has started. Executing code at servlet container startup time is what servlet context listeners are for.
 
Rancher
Posts: 1044
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

prasad guna wrote:window start up means ... use onLoad() java script function.




"Window start up" can be understood as "when a HTML page has been loaded", so it that case the onload approach makes sense.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic