Ant Anywhere


(Apache) Ant Anywhere (AAA?) bridges the gap between the ever-so-useful, but command-line oriented, Apache Ant, and command-line averse WWW users.


I believe that the difficulty in installing most Open Source Software applications is a critical problem. By making it super-easy for developers to make their Java applications installable with just a click, I hope to enable them to get a broader user base and to show the way to better applications.

This O'Reilly article makes mention of the install problem.

RUNNING.TXT of Apache Tomcat is an anti-pattern. That file isn't conveniently web linkable, but the Tomcat Setup doc might lure one into thinking all is well (but note the "If using a J2SE 1.4 JRE" note). This gives a better idea of what's wrong: Idiot's guide to installing Java and Tomcat. This too: How-to install Tomcat on Mac OS X. Some folks have made a stab at fixing the problem for Tomcat.


The Ant Anywhere Demo is a simple loader that packages up a directory of resources and then runs Ant on the build.xml in that directory. AntForm is included so that Swing menus can be easily used.

Ant Anywhere is Ant Anywhere itself with an AntForm GUI so you can create Java Web Start files for your own project by just filling in the blanks.

If you get an error from Java Web Start complaining about not being able to load a resource, give it a second try (I've seen a case were it failed to load the logo icon on the first try).

You can see the files on the web server at

The default index HTML file has been renamed to "xindex.html" so you can see the directory contents as well as that source (otherwise pointing a browser there would just get the redirect to the JNLP launch file). You'll notice META-INF and WEB-INF directories because this is actually an unpacked WAR which can be used to deploy the demo as a self-serving web app by dropping in on your favorite JEE servlet container.


A binary including all source and dependencies at

That is a snapshot of the development directory and currently lacks any information on how to build or use it.

The source at

To Do

Maven Repository (Maven Everywhere?)

The current prototype just copies the whole resources directory into a separate space for each application. Also if one were to follow the example of using the convenient-but-flawed JNLP-WAR Ant task, each jar in the lib is signed and copied without version information. That is not desireable considering that many applications are built from common components. The solution is to use a common repository so that shared files don't need to be downloaded and stored multiple times.

The right tool for that job appears to be Apache Maven.


Ivy is dependency management done the Ant-way. It also supports Maven & Maven2. AntAnywhere is using Ivy.

Ivy+SVN provides Subversion support for Ivy:

"CJAN" (Comprehensive Java Archive Network)

Handling project sources, binaries, and dependencies automatically as in "CPAN for Java" is part of what we're after here. And several folks have started projects called "CJAN", but none seem to have been successful.


IzPack is an OSS installer maker for Java.

Integrating IzPack with AntAnywhere will make a full-featured solution (when we've got services management too of course).

Article on IzPack support in NetBeans

"Deployment: Easy Installing with IzPack"


OSGi, JNLP, and Jar Versioning are coming together as JSR-XXX.


The Spring folks are also making OSGi easier to use including Maven support.

Swing Application Framework (JSR-296)

The Swing Application Framework provides application lifecycle API for Swing applications. Noteworthy because it is applet & sandbox compatible.

NetBeans Module API

NetBeans RCP (hence Swing) complement to Eclipse's RIA.

Embedded Web Server (Apache Anywhere)

Since many of the applications we'ld like to distribute are web applications, we need a web server to run them on. So we need to package up a web server or two. Jetty is easy to package, but not all web applications work with it[1], so the popular Apache Tomcat is needed too. And to make that useful we need a control panel. Also some glue so that web applications (WARs) packaged as AA JNLP files can deal with the web server dependency and user preferences. Finally a MIME type handler for web applications that are just packaged as plain WARs might be nice too.

Web UI (GWT)

The prototype uses Ant Form to present a Swing UI. While that may be fine for a few things that can only be performed locally on the desktop (like embedded web server configuration that can't be done after the web server starts), in IFCX we always want to make sure there is a Web UI.

GWT is the natural toolkit for this.

For those wondering why we need a Web UI for personal applications and don't think that remote access is a common enough use case, here are a few more reasons:

  1. Given that the user clicked in a web browser to launch the application, unless we know otherwise we should assume they'ld like the application to present itself in the web browser. Forcing a switch of UI modes should only be done when retaining the current mode is not possible.
  2. While Sun's Java Web Start will always have Swing, that doesn't mean all JNLP capable platforms have it.
  3. We should not assume that because a user can access their web browser that they can (or can just as easily) use Swing. Even though Swing has good Accessibility support, that doesn't mean the user is configured for it or is familiar with it.


User friendly hostnames and automatic service discovery & configuration are definitely things we want. Zeroconf is the way to go (alas Jini, like Java Applets, died due to bad parenting).

While Apple's improved licensing (Wikipedia:Apache License) for Bonjour aka Zeroconf is nice, I want to see how well a Java implementation works.

This article on jRendezvous in MacDevCenter looks helpful. jRendezvous was implemented by Arthur Van Hoff while at Strangeberry, but the old links there are no longer active. Fortunately Arthur had the good sense to use LGPL as the license.

jRendezvous is now jmDNS (Java Multicast DNS) and it is at SF:


And since Microsoft will obviously continue to ignore open standards in favor of their versions, bridging the gap between Zeroconf and UPnP is something we'll have to do ourselves. A particular motivation is that some routers (such as the Linksys WRT52G) support UPnP. Also Windows and IE presumably can something with it.

The UPnP Forum is the primary reference site.

Cyberlink for Java is an OSS (BSD) Java implementation of UPnP. The project is on SF.



AntForms & AntMenus is an easy-to-use tool for creating Swing UI for interacting with the user from an Ant Script: AntAnywhere currently uses this library.

AntAnt is a precooked Ant build for typical Java projects:

Spring WebFlow has a multiproject Ant build that uses Ivy (which in turn works with Maven & Maven2) called common-build. It is comprehensive with support for demanding Java applications. While the directory layout looks like overkill for very small projects, it has the benefit of not needing to change as project needs change. It doesn't have its own page or documentation but if you download Spring WebFlow source it is in the "common-build" top level directory: . AntAnywhere is transitioning to common-build.

SFUtils is an Ant task for publishing with the FRS (File Release System):

Mac OS X Bundles

Ant task JarBundler makes Mac OS X Bundles.

Sparkle makes updating Mac software easier

Windows EXE


JNLP API Javadoc

Java Web Start on Linux


The Ant Java Web Start Task "ant-jnlp-war" makes creating a JNLP WAR with embedded codebase servlet and Pack200 a simple one-step process: It is currently used in AntAnywhere.

Rachel ( is a nifty tool that serves up resources out of Jar files using URLs. That is convenient for code that thinks its resources are files and don't want to mess around with classloader jazz.

"Generate a NetBeans module for your library or JavaBeans in one Ant task"

Application delivery via RSS


Top Ten Java Web Start Applications

Douglas A. Lyon and Francisco Castellanos "The Initium RJS Screensaver: Part 4, Automatic Deployment", in Journal of Object Technology, vol. 5. no. 8, November-December 2006, pp. 31-40

Deployment: Goodbye scary security dialog box!

Nice job of packaging using Ant and JNLP in Tibet has equally nice documentation.



Build Transformations

While AntAnywhere is not limited to Java applications, it is not intended to manage the general *nix package problem. The proliferation of package managers there isn't the answer either, but we will need to leverage them in the meantime (with the help of system virtualization and application bottles) to get the needed ease-of-use on the way to PUP Foundation.

Zero Install System

A Unix-oriented scheme using feeds for web-based launching ("Unix Web Start").

Package Managers

RPM, Apt, Fink, CygWin, ...

Java Native Code
A GCJ wrapper.
Annotations for linking to DLLs

Groovy has ActiveX support.


"Resources for Automatic Updates of Java Applications"

"Zero Install: An executable critique of native package systems", by Bruce Byfield

Ant-based build automation

Anthill article