Tuesday, 20 October 2009

One JAR for all your JARs

Sometimes it is more convenient to package your Java application into a single JAR which includes all dependencies and works just like an executable. This seemingly simple objective becomes complicated when the dependencies include other JAR files as one can run into JAR Hell with the Java Class Loader. One possibility of achieving the goal of having a single executable jar is using One Jar.
The unique aspect of OneJar is that dependencies can be bundled into the executable Jar in their native form without unpacking the classes and the custom class loader resolves and loads required classes from within the dependent jars. The default Java class loader can only load classes from the file system, it cannot look inside other jars for the required classes. To achieve loading of classes from within other jars, a custom class loader is required which is provided by One Jar.One Jar also provides an Ant and a Maven2 task and can be easily integrated into your build cycle.

Tuesday, 6 October 2009

Scalable Vector Graphics

Scalable Vector Graphics provide a rich source of functionality that allow applications to manipulate and respond to the user interactions with the image. Creating and modifying SVG images is possible using one of the several open source tools available.

Batik SVG Toolkit is an impressive Java based open source SVG toolkit that provides libraries for the dynamic manipulation of SVG objects from within a Java application. While Batik provides a rich array of functionality, it somewhat lacks a good WYSIWYG editor.

A good WYSIWYG editor for SVG Graphics is provided by Inkscape which is another open source SVG editor with several advanced editing features such as (markers, clones, alpha blending, etc.)