• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

start a program at window startup

 
Saurav Suman
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • 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.
 
prasad guna
Ranch Hand
Posts: 46
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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: 42967
73
  • Mark post as helpful
  • send pies
  • 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.
 
Ivan Jozsef Balazs
Rancher
Posts: 972
5
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic