Processing, week 2
Today marks the second week I have been learning Processing, a Java-based language for “program[ming] images, animation, and interactions.” In other words, I want to learn how to make useful, pretty graphics.
Over the past year I had seen Processing mentioned here-and-there in various articles, but what piqued my interest was a visualization of US zipcodes. Check it out; it’s awesome.
My guide, at least for now, is Visualizing Data by Ben Fry. I just completed reading the third chapter and thought I’d share an example program. Read more
Use Advanced Installer licensing within a Java application
Advanced Installer 6.7 has a new licensing and registration feature which allows for time-limited demos/trials and registration of installed software.
Caphyon, the maker of Advanced Installer, provides code samples and documentation on licensing integration for C++ and C# applications. To use this feature, the application must make a call into an Advanced Installer library and handle its return code.
The library is a gatekeeper to the rest of the application, effectively deciding whether or not the application is allowed to run. It determines the software’s trial status and displays a registration dialog, terminates the application, or returns a code, accordingly. The Java implementation of this feature works a little differently.
For those using the Java Launcher, integrating the licensing feature is easy: simply add the Java Product on the Licensing Options tab. But, what about those who don’t use Java Launcher? Or those that wish to enable users to register from within the application?
There is no official documentation which answers these questions, but based on a discussion following a request for help I posted on the Advanced Installer forums, I was able integrate AI’s licensing feature into my Java application without using the Java Launcher. Read more
Eclipse on Ubuntu without GCJ
Software packages from Ubuntu repositories can have some interesting and problematic dependencies. One such example is Ubuntu’s dependency on GCJ for Ant.
Ubuntu’s Eclipse package also depends on GCJ. If you wish to avoid this dependency, simply download the appropriate binary distribution from the Eclipse download site, extract to the location of your choice, and run Eclipse.
Before using Eclipse, be sure you have Sun’s JRE installed and configured as the default JRE.
Obfuscating a webapp .war file with yGuard and Ant
One way to protect Java software from casual reverse engineering is obfuscation. Essentially, an obfuscator renames classes, variables, and packages with random/meaningless names. The application still functions correctly; the decompiled code becomes difficult to read.
There are quite a few obfuscators for Java — at least a dozen when I looked — most of which are easily used from an Ant script.
For my use I selected one with a ready-to-use Ant task: yGuard. Unfortunately, yGuard operates on .jar files only, not individual .class files or webapp .war files. Thus, I have written my own Ant script which uses yGuard and built-in Ant tasks to obfuscate .war files. Read more

