1

I want to prompt user for password whenever user starts windows system or when ever user logs in to windows system, is there any way to capture windows start up event in java?

Krishna Verma
  • 814
  • 2
  • 8
  • 23
  • this may help u http://stackoverflow.com/questions/17746613/how-to-intercept-windows-startup-event-in-swing – MANOJ GOPI Jan 27 '15 at 05:18

1 Answers1

1

No, I, unfortunately, do not think this is possible. Your Java application has to be called by Windows when it starts. Java doesn't really have the ability to 'start' other things like this.

Option 1:

One option you have is packaging your application in a jar or executable. Then, check out these directions. You basically want to create a shortcut in the start directory to point to the application. This is only really good if you have a dedicated application already created.

Option 2:

What I would do is try to launch a .bat file on startup. This can be achieved by doing the following:

start > all programs > right-click startup > open > right click batch file > create shortcut > drag shortcut to startup folder

And the batch file would look something like:

java -jar application.jar

I hope this helps you!

Community
  • 1
  • 1
James Taylor
  • 6,158
  • 8
  • 48
  • 74