I've fixed the package name generation for the templates in the Java bundle. I've implemented a bit of configurability to the bundle by using a custom shell variable (set in the TM preferences) to override a default regular expression. Check the source for details. If others follow my example, I recommend implementing a reverse domain namespace schema; I'm using "org_bravo5_Java" for variables used by the Java bundle.
The newest version is (always, now) available at http://telly.bravo5.org/~blalor/bundles/Java.tmbundle.tar.gz