Check out Julien Ponge’s article on Fork and Join in Java 7.
Every so often I get myself confused about Java’s often-obtuse handling of dates and timezones. So, for my future self’s benefit, here are some reminder notes… Continue reading »
Post updated 2011 Jan 19: Given the opportunity to install 10.10, I have added different instructions for Ubuntu 10.10 (Maverick Meerkat).
Much to my surprise, but probably not those of the Open Source Ruling Class, Sun’s Java 6 has been removed from the Ubuntu Multiverse. Apparently the Ubuntu folks have started putting some weight behind their recommendations for switching to the “OpenJDK.” Fortunately, the official, “proprietary” Java is still available through another Ubuntu repository.
Ubuntu 10.10
To install Sun’s Java 6 JDK on Ubuntu 10.10, add the Sun Java6 Community PPA and install:
add-apt-repository ppa:sun-java-community-team/sun-java6 apt-get update apt-get install sun-java6-jdk update-java-alternatives -s java-6-sun
Ubuntu 10.04
To make Sun’s Java 6 JDK available on Ubuntu 10.04 add the new repository like so:
add-apt-repository "deb http://archive.canonical.com/ lucid partner" aptitude update aptitude install sun-java6-jdk update-java-alternatives -s java-6-sun
If you’re using ehcache’s disk persistence feature, which allows the cache to survive across JVM restarts, be sure to shut down ehcache properly.
To do so when using ehcache within a webapp, simply add its ShutdownListener as a listener in web.xml.
<listener> <listener-class>net.sf.ehcache.constructs.web.ShutdownListener</listener-class> </listener>
Alternatively, or when not using ehcache inside a webapp, instruct ehcache to register its own shutdown hook by setting a system property.
net.sf.ehcache.enableShutdownHook=true
If you forget one of the above, your persisted cache may not be up-to-date, or worse, not persisted at all.
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. Continue reading »


