How can I Start My application on Start up of Windows in java

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?

Answers


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


  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.


Need Your Help

Rotate HTML with JS as in Photoshop's free transform

javascript rotation

I need to rotate some html content (let it be a div) by dragging a block inside it with a mouse. The content should rotate around it's center. Look at http://www.polyvore.com/cgi/app (drag an element

OutOfMemory although Heap Size is less than 6MB

android heap

In my Android developer console, I see some crashes with