Last night I went heads down researching and trying to figure out how to get passed the infamous preverify hurdle when building J2ME apps on OS X. I’m happy to report that I’m an idiot. I went through a boatload of trouble finding and almost attempting to fix a bug in the Antenna preverify task as it is slightly broken on OS X. I emailed everyone I could think of who had anything to do with Antenna, the Maven2-J2ME-plugin, and OS X. I submitted to blog posts along the way as I worked. Just moments ago I found what looks like a much more simple fix. The Pyx4ME project includes support for Progaurd which now includes a preverifier! I completely overlooked this option as I waded through mounds of documentation al from different sources regarding the best way to get past preverification on OS X.
I just ran a build with the Progaurd preverify option and it succeeded! I haven’t tried to run it or anything… that step comes next. I’m all too excited to see something actually run all the way through on my Mac.
I must admit that I’m slightly hesitant to take this approach due to the frailties our team has found with build time tools for J2ME. I’m speaking about issues with different JVMs, different obfuscators, too many obfuscators, lack of obfuscators, preverify configuration, application signing methodologies, and every other flaming hoop you have to leap through to get a decent build for a single device. I’d go into detail but I wanna keep plugging away to see how far my insanity can carry me.
In other breaking news I found a possible way to do true cross platform WTK development. If you’re not familiar OS X is the one platform where you really can’t do JavaME unless you’re really really savvy! The missing too is preverify. (An intel Mac compatible version can be found deep in the bowels of the PhoneME source download.) There’s the ol’ MPowerplayer preverify tool but that’s a little dated and out of synch with the WTK preverify tool. As a result you’ll find tools such as the EclipseME and Pyx4ME plugins won’t work with it. (Actually I believe EclipseME has Mpowerplayer support but I haven’t tried it.) I’m gonna keep this short so I can work on it. There’s this cat that’s blogging about doing cross platform JavaME development and I’m reading the blog now. On the blog he explains that the preverify tool in the PhoneME MR2 download under phoneme_feature/cldc/build/share/bin/darwin_powerpc/ will run on an Intel Mac. I just tried it on my 2.4Ghz MacPro running Leopard and I was able to bring up the help text from the command line. I’m loosely following his write up and a few other tutorials and links in an attempt to create a deployable Blackberry J2ME project using Maven on my Mac. We’ll see how far I get.
Run rapc on Linux? Rapc for Mac? BSD and rapc?
Seriously, is this possible? I’ve been wondering for a while how feasible it would be to do J2ME development full time on a Mac or Linux machine and I dunno… it sounds reasonable at times and far fetched at other times. Today I found this gem. A guy supposedly got rapc, the Blackberry compiler, to work on a Linux machine. I’ve personally managed to sign Blackberry apps without requiring a full JDE install so maybe this is the other half of what I’ve been looking for? Here’s a shameless copy from the forum, in case it ever get deleted or lost:
1. Compile normal midp-2.0 midlet with J2ME SDK from Sun
2. set up $WTK_HOME to point to your J2ME install, $RIM to point to
your JDE/MDS/classpath, and $APPNAME to your app name
4. cd to $WTK_HOME/apps/$APPNAME
java -jar $RIM/rapc.jar import=$RIM/net_rim_api.jar \
codename=$APPNAME -midlet jad=bin/$APPNAME.jad bin/$APPNAME.jar
Your .cod file will end up in current dir. bin/$APPNAME.jad will be modified to contain all
I’m looking to do something with this knowledge. I’ll post back if I ever come up with something.
Update*I found the Sphinx4 project which looks like something I can start with… If anyone knows where to find the API Javadocs or any other documetation for Apple’s Speech engine drop me a line. I’d love to do a comparison. For one I know the voices sound better than FreeTTS.
I’ve been ’round the web looking for a couple of miracles. One of said miracles would come in the flavor of either a Linux-compatible or platform agnostic (Java) full featured VR/TTS system. (For those of you that ain’t down with the fancy acronyms VR = Voice Recognition, TTS = Text To Speech.) Do you know of such a beast? I’ve found several half solutions many arepricey or geared towards Windows. There’s FreeTTS which covers the TTS side ok but requires you incorporate a third party speech database if you want your app to sound like anything less robotic. There are actually two alternative sources for better sounding speech collections, one of which is secured by a non-commercial use license rendering it useless for me. Meanwhile the other option is somewhat complicated so I prefer not to waste my time.
The other miracle would resemble a working end to end solution for signing a J2ME MIDlet. You see, I have this Verisign certificate and I went through the trouble (and I do mean trouble… signing an app is a black art not meant for the faint of heart…) of importing the certificate into my keystore. I believe that’s step 45 of a 5,893 step process that always feels like you’re almost finished. Now when I use either Ant’s signjar, Antenna’s wtksign, or both I can never get the thing to download over the air (also known as installing OTA). It’s almost like I’m missing something but I don’t know what. I can get the jarsigner command line tool to verify the app has been signed (only after invoking the signjar task). I can also get the signatures added to the jar (only after using wtksign which doesn’t seem to sign the jar). But then I must manually update the size attirbute in the jad file after everything has been signed. Where am I going wrong? Have any of you ever managed to get a signature over your application? If so which species of chicken did you use to work your voodoo? Was there a shrunken head involved? Maybe that’s where I’m going wrong. My head is too big for the spell to be cast properly. If you don’t know, lemme know… y’know?