Log in

View Full Version : REVIEW: Java/Midlet Environment IBM J9 Version 6.1


Menneisyys
05-09-2006, 10:08 AM
Great, Free Java/Midlet Environment IBM J9 New, 6.1 Version is Out – a Full Compliance & Bug Report & Never Before Published Tweaks that Help Using It Much Easier

IBM WebSphere(R) Everyplace Micro Environment (IBM J9 for short) is one of the best Java and Midlet environments for the Pocket PC (please see this tutorial (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=644&more=1&c=1&tb=1&pb=1) on what Midlets are and how they can be used). If you make a generic search in my Pocket PC Magazine Expert Blog (http://www.pocketpcmag.com/blogs/) for "IBM J9" or look around in my full-blown Java-related articles (for example, Using Java on the Pocket PC - the complete tutorial (http://www.pocketpcthoughts.com/forums/viewtopic.php?t=41081) (alternatives: FirstLoox (http://www.firstloox.org/forums/showthread.php?t=4173), PPCMag (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=16612)); also, the "Java" sections in my Pocket PC Magazine Expert Blog (http://www.pocketpcmag.com/blogs/) are worth checking out), you’ll get numerous hits. The former Midlet article and the latter generic Java article are both worth checking out to see what midlets are capable of/usable for. Opera Mini, Google Maps, Toonel - just to name the three most important "killer apps".

The last version of J9 was released over a year ago – it took IBM a year to move to a new version. It was indeed worth the waiting - the midlet support is indeed definitely better than the previous version.

What’s new – in a nutshell

* Improved Midlet compliance – now, it’s fully compliant with all versions of Opera Mini Advanced (including the latest, 2.0 version (http://www.pocketpcmag.com/blogs/index.php?blog=3&title=alternate_great_multiplatform_web_browse&more=1&c=1&tb=1&pb=1)). I didn't have problems with Google Maps either.
* VGA (high) resolution support, at least as far as text rendering is concerned, without having to use the native VGA mode on VGA devices. (Unfortunately, this only applies to text rendering. Rendering of graphics in standard SE VGA is still pixel-doubled, which will be a real pain with graphics-based midlets like the ingenious Google Maps. Then, you'll need to reboot the device into native VGA mode.) There're two separate versions for QVGA and VGA devices; I'll elaborate on the differences of the two in a separate section, with a lot of practical tips and tricks never published before.

Downloading

The evaluation version of the Java/midlet suite can be downloaded here for free (http://www-128.ibm.com/developerworks/websphere/zones/wireless/weme_eval_runtimes.html) (note that the suite only costs money for customers that want to distribute it with their Java apps/midlets; end-users, as far as I understand, can freely download/access J9 without any trial/time restrictions. This scheme is pretty similar to "free for individual users, costs money for mass-deployers or hardcore business users" apps like the Oracle databases). Unfortunately, it requires (free) registration, the download section isn’t really intuitive (there’re several versions there; much as it’s not very hard for anyone that knows the Java and the WindowsCE terminology like the palm of his or her hand to get around; for others this may be pretty hopeless) and the download sizes are HUGE (compared to their real content, which is about an order of magnitude smaller than the EXE installers themselves). Unfortunately, as opposed to the previous version (http://www.handango.com/PlatformProductDetail.jsp?siteId=1&platformId=2&N=96806&Ntt=websphere&productId=140968&R=140968), Handango still doesn’t have these environments – that is, you’ll need to download the files off IBM’s site.

Alternatively, to save time/effort (no need to register/look for the right version/install)/download bandwidth, you can also download from the following alternative source. The following are the ZIP files included in the downloadable EXE installers; they’re all you’ll ever need on your PDA. You can find the QVGA MIDP version here (http://www.winmobiletech.com/052006IBMJ961/weme-wm50-arm-midp20_6.1.0.20060317-111429.zip), the VGA MIDP version here (http://www.winmobiletech.com/052006IBMJ961/weme-wm50-arm-hires-midp20_6.1.0.20060317-111429.zip) and the Personal Profile 1.1 version here (http://www.winmobiletech.com/052006IBMJ961/weme-wm50-arm-ppro11_6.1.0.20060317-111429.zip).

What are the differences between the two (MIDP and Personal Profile) versions?

In general, if you "only" want to run midlets (Opera Mini, Google Maps, some IRC clients etc), you will only need to install the MIDP version. If, on the other hand, you plan to run Java applications like Toonel (http://www.pocketpcmag.com/blogs/menneisyys/ConfigureToonel45.asp), one of the greatest applications for the connected Pocket PC, you'll need the Personal Profile version.

Also note that, as with the previous Personal Profile versions, this version doesn't have a Pocket Internet Explorer / Internet Explorer Mobile Java applet plug-in either. You will still need to use either an old Jeode version or the best generic Java Virtual Machine, CrEme (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=637&more=1&c=1&tb=1&pb=1) for this purpose.

Installation

Interestingly, as opposed to the previous, over a year old 5.7.2 version, this version doesn’t have any kind of CAB-based installer. This is a big problem because the "copy the files to the PDA" manual install method will scare away a lot of potential users.

All you need to do is decompressing the contents of the given ZIP file to any subdirectory on your PDA or storage card. You won't need to copy the doc and the examples directory to the destination. Also, you can safely delete every ZIP files that have (for example, end at) src/source (for example, lib\charconv-src.zip and lib\jclMidp20\source\source.zip) to save space - they aren't needed either.

Note that both the MIDP and the PP versions can be installed anywhere; for example, on a storage card.

My registry script

As the installation is not CAB-based but involves manual file copying, there won’t be any kind of automatic registry imports either. The latter is very important – it’s a pity not even the official IBM documentation (see install.pdf in the doc subdirectory of each ZIP distribution file; these PDF files are also available with each version on the IBM homepage) explain the JAR/JAD file association with the MIDP environment so that deploying midlets becomes far easier. The way it is done without the registry import file I’ve created is much-much inferior to the traditional way of ‘just click the JAD file and it is automatically deployed in J9’. Exactly this is the way of deploying midlets that my registry import scripts makes it possible.

To do this, just download this registry import file (http://www.winmobiletech.com/052006IBMJ961/regimp.reg), change all occurrences of "\\SD Card\\J9-MIDP\\" string in there (for example, with Ctrl-H and Change All in Windows Notepad) so that it points to the home directory of the MIDP J9 on your PDA and import it into the Registry of your Pocket PC (The file is in Regedit5 format and, therefore, you’ll need to use for example Resco Registry Editor to import it. Please see the Ultimate Roundup of Registry Editors for the Pocket PC (http://www.pocketpcmag.com/blogs/menneisyys/UltimateRoundupOfRegistryEditors.asp) for more info). After that, if you click a JAD file, it’ll be automagically deployed in J9 – you won’t need to follow the very-very-very awkward way the official IBM tutorial suggests. Strange the folks at IBM didn’t notice this really big problem – IBM has always been a bunch of really clever people (after all, I too have a high-end, 1600*1200 UXGA IBM Thinkpad notebook and just love it). The lack of CAB installer clearly show this product isn't really finalized.

VGA device users, attention!

As has already been pointed out, the MIDP version (the one that is able to run midlets) of J9 comes in two flavours: one meant for VGA Pocket PC's and one for QVGA ones.

Unfortunately, the VGA version, while it doesn't do pixel doubling on text (unlike the previous J9 version), still pixel doubles images as can be seen for example in this Google Maps screenshot (http://www.winmobiletech.com/052006IBMJ961/GoogleMaps-J961-PL720.bmp.png) (and all the other, VGA screenshots in this article; for example, this one (http://www.winmobiletech.com/052006IBMJ961/IBMJ9MIDP-PPCMag-1.bmp.png)). Therefore, you will need to switch to native VGA mode (please see my tutorials on doing this if you're unsure - VGA demystified - the definitive guide to OzVGA, SE_VGA and everything VGA-related (http://www.pocketpcthoughts.com/index.php?action=expand,43014) (alternatives:iPAQ HQ (http://www.ipaqhq.com/forums/showthread.php?p=111622), AximSite (the x50/x51 (http://www.aximsite.com/boards/showthread.php?t=98163) forum; the Tips and Tricks (http://www.aximsite.com/boards/showthread.php?p=827585) forum), PPC Magazine (http://pocketpcmag.com/forum/topic.asp?TOPIC_ID=18237), FirstLoox (http://www.firstloox.org/forums/showthread.php?p=39887))).

Strangely, the VGA-specific MIDP J9 version will not run in native VGA mode (as opposed to the standard SE VGA mode). This means you will need to stick to the QVGA version in native VGA mode. It will, as with the previous J9 version in native VGA, render images correctly in native VGA mode as can be seen for example in this Google Maps screenshot (http://www.winmobiletech.com/052006IBMJ961/GoogleMaps-J961-PL720-2.bmp.png). As can be seen, there's no pixel doubling in this image.

Note that you can safely keep the two (VGA and QVGA) versions on the same Pocket PC. As they use the same deployed midlet repository in the file system (\My Documents\temp - strange they have chosen such a prone-to-be-cleaned-up directory name instead of putting everything in \My Documents\midlets or \My Documents\recordStores - the latter, now, only functions as a cache and settings directory for midlets), you can safely switch the J9 version you use - they both will find the midlets deployed in the other version, with all the settings and cache data and even current state to be resumed from, if available (as is the case with Google Maps, for example).

If you want to absolutely reduce (storage) memory consumption, you can safely switch the files bin\ivemidp20_23.dll and bin\j9midp20.exe - these are the only two files the QVGA and the VGA versions differ in. That is, if you, for example, only install the VGA version on your PDA but also have the bin\ivemidp20_23.dll and bin\j9midp20.exe files from the QVGA version at hand so that you can also use J9 in native VGA mode, in there, you'll only need to overwrite the two VGA-related files with these. (And vice versa.)

The Good

Better MIDP (Midlet) compliance

As far as the MIDP compliance is concerned, I’ve thoroughly tested the new version. It’s indeed a considerable step ahead. While the old 5.7.2 version couldn’t run the Advanced version of Opera Mini, the new version can. Everything works – for example, downloading files off the Web (a Pocket Loox 720 screenshot here (http://www.winmobiletech.com/052006IBMJ961/PL720DownloadBinary-1.bmp.png); it works the same way as in the Intent Midlet Manager (http://www.winmobiletech.com/052006IBMJ961/IntentMidletManagerPassesRequestRightToIEM.bmp.png)) – that is, just making the built-in Pocket Internet Explorer/Internet Explorer Mobile download the files. Note that you may have problems with this if you have let alternate browsers taking care of http:// URL’s. (In previous Opera Mini versions, it was, naturally, not available as can be seen in this Opera Mini 1.2 screenshot (http://www.winmobiletech.com/052006IBMJ961/FormerVersionDidntSupportDownloading.bmp.png)).

I’ve also tested the new version with the latest, version 4 beta of WLIrc 2.0 (http://thesverre.servebeer.com/index.html), the best Midlet-based IRC application (see the roundup IRC Applications for the Pocket PC (http://www.pocketpcmag.com/blogs/menneisyys/112005IRCClients.asp) for more info if interested). Unfortunately, it’s still not possible to click the individual names in a names list; however, (some) commands entered to the text input field work (for example, whois (http://www.winmobiletech.com/052006IBMJ961/WLIrc-Whois.bmp.png)) and so do private messages – that is, the situation hasn’t changed much from the previous version. An example screenshot is here (http://www.winmobiletech.com/052006IBMJ961/WLIrcIBMJ6Test.bmp.png) (Pocket Loox 720) and here (http://www.winmobiletech.com/052006IBMJ961/WLIrcIBMJ6Testx51v.bmp.png) (x51v). On the x51v, the IRC midlet worked pretty OK, unlike Opera Advanced.

It IS compatible with WM2003(SE)!

Much as IBM only lists WM5 as the operating system version 6.1 of J9 is compatible with, it’s certainly not the case. I’ve been running it on my WM2003(SE) devices without any problem. An example screenshot of the WM2003 iPAQ 2210 running IBM J9 is here (http://www.winmobiletech.com/052006IBMJ961/iPAQ2210IBMj961.bmp.png).

That is, you can safely install the new J9 version on pre-WM5 (WM2003/WM2003SE; earlier operating systems aren't supported) devices, it’ll work just great.

The Bad

The Personal Profile Version Still Isn’t Fully WM5-Compliant

On the other hand, the Personal Profile version, while, as opposed to the Personal Profile 1.0-only previous version already supports Personal Profile version 1.1, failed in my Toonel test. (Please see this article (http://www.pocketpcmag.com/blogs/index.php?blog=3&p=485&more=1) for the bug report of the previous version.) As you can see in this (http://www.winmobiletech.com/052006IBMJ961/IBMJ9PJ-ToonelTest.bmp.png) and this (http://www.winmobiletech.com/052006IBMJ961/IBMJ9PJ-ToonelTest-2.bmp.png) screenshots, the new J9 PP version still fails at running Toonel.

(A quick remark: if you plan to use an invocation (.lnk) command to start J9 PP and pass a Java class/JAR file to it, you’ll need to use the -jcl:ppro11 parameter instead of the old -jcl:ppro10 used with the older version if you download the PP 1.1 version. This is because the PP 1.1-compliant version doesn’t support PP 1.0; this is why you need to change this argument too).

Major incompatibility issues with the Dell Axim x50v/x51v in Opera Mini

Unfortunately, the midlet version of IBM J9 has problems with the VGA Dell Axim Pocket PC’s. It’s just unbearably slow with all versions of Opera Mini Advanced – while the same IBM J9 running on other Pocket PC’s renders pages instantly, you’ll end up having to watch the progress bar (http://www.winmobiletech.com/052006IBMJ961/x51vSlowToLoad.bmp.png) for dozens of seconds, even without not-that-big pages.

This is definitely not a storage card speed problem (I used exactly the same card and exactly the same configuration in my Pocket Loox 720), nor is it a problem with the high-resolution VGA version (the same VGA version runs in my VGA Pocket Loox 720 without any problems). It seems it’s another x51v compatibility problem. Unfortunately, there are compatibility issues with the x51v, even with the latest, A06 ROM: some other WM5 devices are far more compatible with current applications. Also see the case of Handmark Battleship 1.06 (http://www.handango.com/brainstore/PlatformProductDetail.jsp?siteId=311&platformId=2&productType=2&catalog=0&sectionId=0&productId=80779) (see the story here (http://www.pocketpcmag.com/blogs/menneisyys/102005MPPPCGames.asp)).

It's not a WM5-specific bug either - my WM5 HTC Wizard runs J9-based midlets (including Opera Mini) just great.

Acknowledgements

A big thanks to AximSite user discord for pointing out the new version (http://www.aximsite.com/boards/showthread.php?t=126167).

Modification history

First modification: May 9, 2006, 17:00 CET: added a lot of new information; for example, the differences of the QVGA/VGA versions.

Major addition: May 10, 2006, 9:00 CET: As (particularly now that AximSite has frontpaged the review (http://www.aximsite.com/boards/showthread.php?t=126288)) many users have reported (see this AximSite thread) the currently "killer app" midlet, Google Maps (http://www.google.com/gmm/) is running very slow, I’ve scrutinized the subject a bit more.

It's by far the slowest on my Dell Axim x51v – indeed a single tile loads for about two seconds (there’re several tiles on a map). It's considerably faster on my (not overclocked) WM5 HTC Wizard but not as fast as on my pre-WM5 devices (for example, Pocket Loox 720), where it is flying and loads anything almost instantaneously.

I’ve tried to completely relocate and, when I saw that it’s not possible, disable the midlet cache to see whether it’s the slow file creation/(re)write speed of the in-storage midlet cache that is causing this problem (see the last, "Results of trying to relocate J9-related stuff out of \My Documents in the main storage" section). Unfortunately, it seems this is not possible.

Not that I think relocating/disabling the cache would help – Google Maps is very slow on a WM2003SE (non-WM5) x50v too, where the record cache is stored in the RAM (which is much faster than Flash ROM). That is, it’s definitely a Dell compatibility issue (again, Google Maps is running astonishingly quickly on my non-Dell, pre-WM5 devices under J9 6.1).

All in all, Google Maps won't work on Dell Axim x50v/x51v with adequate speed and can't really be hacked to work either.

Hope IBM will look into the problem really soon. I don’t think the current version of IBM J9 6.1 is in any way final – the CAB-less install is a sign of this, or the “Milestone II-e Release Candidate” type remark in buildinfo.xml.

I’ll contact IBM on this matter.

Results of trying to relocate J9-related stuff out of \My Documents in the main storage

Both the midlet store (the directory (\My Documents\temp) that has a copy of all - renamed - deployed midlet JAR files, along with their description) and the cache directory (\My Documents\recordStores) take up precious main memory/storage. Therefore (in addition to trying to relocate the latter to a faster-than-the-ROM card from the slow(er) built-in ROM storage), I've spent some time on trying to relocate them to an alternative medium. Unfortunately, without any success.

There’re one occasion of the string ‘\My Documents’ in the J9 files (\bin\jclmidp20_23.dll at position 29d14 as can be seen in this screenshot (http://www.winmobiletech.com/052006IBMJ961/IBMJ9MyDocsRelocate.png)). Unfortunately, hexediting it to point to a faster-than-built-in-ROM, heavily optimized won’t work as it seems J9 doesn’t use this.

There’s one occurrence of recordStores (not inside a method/class name) that provides the directory name where the midlet runtime cache is stored (\lib\jclMidp20\jclMidp20.jxe at position 26f7c as can be seen in this screenshot (http://www.winmobiletech.com/052006IBMJ961/RcStores-1.png)). It can’t be relocated either as it’s using relative-only paths (that is, starting the new path with a \ won’t work). I’ve even tried completely disabling the runtime cache by completely deleting this (just entering a 0 byte as the first byte, hoping that the built-in exception/error handling mechanism in J9 will still let for running midlets even when there’s no cache. Unfortunately, then, nothing worked – it was impossible to access stored midlets or deploy new ones.

Menneisyys
05-09-2006, 04:17 PM
Modification (May 9, 2006, 17:00 CET): added a lot of new information; for example, the differences of the QVGA/VGA versions. Really worth re-reading.

Menneisyys
05-10-2006, 08:13 AM
I've just added a new, large section to the article on both the Dell Axim x50v/x51v compliance of the excellent Google Maps (http://www.google.com/gmm) and the relocatability reports on J9's files/cache in the main memory.