Josh held the premiere session for AB5k Tue at Java Posse Roundup (I will post a summary of the week soon). Since there is some discussion going on, including our getting panned at JavaLobby, I thought I would write up a little bit about how the desklet runner system works.
.desklet files are, simply, JAR files. Inside the META-INF folder you place a desklet.xml file that looks something like this:
ROME Reader Robert Cooper http://www.screaming-penguin.com An RSS/Atom Feed Reader com.totsp.desklet.rome.RomeDesklet http://myserver/repo jtidy jtidy 8.0-20060801.131059-3 rome rome 0.9 jdom jdom 1.0 FlyingSaucer core-renderer R6 FlyingSaucer cssparser 0.9.4
Most of the stuff at the top is pretty straightforward. The big thing here is the dependency management. There are a number of ways you can specify deps for your desklet. The recommended way is to specify them in the desklet file, alternately specifying a repository in Maven 1 layout (M2 will be supported soon), and declare the dependencies in your desklet.xml file. When your desklet is installed the required dependencies will be downloaded and put into a shared repository. The reason this is the best tact is downloaded dependencies are put into a shared repository and are not re-downloaded for each desklet, improving the user experience, and reducing desklet size.
Another option is to place the dependencies in the META-INF/lib folder in a Maven 1 repository directory structure. That is, META-INF/lib/[groupId]/jars/[artifactId]-[version].jar. Jars packaged in this manner will take precedent over the local repository. This can be useful if you want to ensure for security or other reasons that the exact version of the Jar you want will be used with your desklet.
The final way you can package dependencies is to simply place Jars you need into the META-INF/lib folder directly. These jars will be in place for your desklet, but do not have to be declared in the desklet file. This is a convenience, and can be useful if you have Jars that are not deployed to a Maven repository. However, please keep in mind your desklet files can become large when you do this.
That is all for now. You can expect Josh to be posting information on the specifics of writing desklets this weekend. I will also post information about security and runtime of desklets later this weekend. Also, please keep in mind that between now and JavaOne a lot is expected to change.