how to create drag and drop mac installer?

I have made my java application's jar file and now want to create drag and drop installer for it.Also I want to know that how to create shortcut for Applications folder for the same purpose. how can I do this?


Seth Willits' DMG Canvas is a great and easy way to create customized DMGs (with things like an Applications folder shortcut, background image, etc). Yes, you can do this all yourself with hdiutil and whatnot, but I much prefer using a GUI.

You can Package your .jar into a .app (inside a dmg that has drag&drop) with Javapackager like this:

javapackager -deploy \
    -title "YourTitle" \
    -name "Name" \
    -appclass your.class.start \
    -native dmg \
    -outdir ~/Downloads \
    -outfile yourOutFileWithoutExtension \
    -srcdir "SourceDir"

you could use -srcfiles Your.jar if its only a single jar.

Use either Disk Utility or the hdiutil command-line tool. It's easier to integrate hdiutil into an automatic build workflow.

You need to create a small disk image containing your application and a symbolic link to the Applications folder. Use Disk Utility or hdiutil to create the image. You can just copy the application in, and create the symbolic link using Terminal:

cd /Volumes/DiskImageName
ln -s /Applications Applications

Need Your Help

Codeigniter Flexi Auth library loads sometimes


I am working on the log in system for a site using Flexi Auth in Codeigniter V 2.1.4. I am trying to pass a user's log in status to a menu that changes dynamically depending whether a user is logge...

Drupal 7 Search Autocomplete module never loads "suggestions"

search autocomplete drupal-7

I am attempting to use the module Search Autocomplete 7.x-4.0-alpha2.