Pregunta

I have My Swing Application. and What I want to do is Lunch that Application when Windows Start up. so how can I do that Can i have suggestion? and application is Desktop application. and What to do for MAC system is there any way for MAC system for do this same?

¿Fue útil?

Solución

On Windows

You could simply place an executable item in the users Startup folder, see Run a program automatically when Windows starts for more details.

This will require to supply a short-cut (which can launch the jar using java.exe) or a batch file or a executable wrapper, like exe4j or launch4j for example.

On Mac

There are a few places to look for startup items:

Items can launch upon startup from the following locations:

System Preferences > Accounts > yourusername > Login Items
(Lion users: System Preferences > Users & Groups > yourusername > Login Items)

/Library/LaunchAgents/ and ~/Library/LaunchAgents/
(Lion users: In Finder, click Go > Go to Folder > then enter the path)

/Library/StartupItems/
(Lion users: In Finder, click Go > Go to Folder > then enter the path)

This assumes that the application has been bundled as an application bundle. See Packaging a Java App for Distribution on a Mac and Java Application Bundler for more details.

There may be additional requirements in the pinfo files that I've not highlighted, but these are the basics. This is not an area I have experience in, but something I've done a little bit of research into

Take a look at:

For more details

Otros consejos

  1. Click the Start button Picture of the Start button , click All Programs, right-click the Startup folder, and then click Open.

  2. Open the location that contains the item you want to create a shortcut to.

  3. Right-click the item, and then click Create Shortcut. The new shortcut appears in the same location as the original item.

  4. Drag the shortcut into the Startup folder.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top