Java/Midlet Environment IBM J9 *with* JSR-75 support (updated)

Monday, June 30th, 2008 at 2:17 pm

This is an updated entry of the original post from November 2006. This article deals with the installation of the Java environment on mobile devices.

I have received a lot of feedback, a few comments as well as supporting requests that are concerned with Java on mobile devices. Recently I also received a comprehensive update from Fred Gnuechtel (IBM) regarding the Java environment on mobile devices. See below.

First of all: IBM J9 is from my point of view the best and most complete Java Runtime for mobile devices. So that’s good news ;)

Palm users have an easy life to install this: They can easily download and install a fully maintained IBM J9 directly from Palm for 5$ or so, including the JSR-75 file I/O framework. are left out of the game and Java is no longer available: http://www.palm.com/us/support/jvm/index.html. Too bad, sorry!

For Windows Mobile users it was more difficult in the past to have a working IBM J9 installation, since it was down to the vendors whether they installed IBM J9 or not, which unfortunately did not happen too often. In the past I provided a small tutorial here on how to get J9 installed from IBM’s open source development environment.

However, according to Fred Gnuechtel from IBM it seems to be not a legitimate way to do things and IBM has removed the most visible J9 sources. I was not aware of this and have removed the tutorial for obvious reasons.

But there are very good news for you still: Handago.com offers now a IBM Java environment for various Windows Mobile phones. Sounds like not too much “tinkering” to get a IBM J9 installation! Super :)
Kudos to IBM and Handago for making J9 available to the end-user now.

Information provided by Fred Gnuechtel (IBM):

I can provide the links, but Handango tends to reorganize their WEB site about once a quarter and then i have to do on a WEB safari to find where they went. So please be aware that you may have to update them from time to time. They also force you down a path of selecting a device and then telling you that J9 is not supported on it. You have to ignore this. Again, this is part of the Hanango WEB sites effort to reduce their support cost and returns. Here is a copy of the note that i send when someone contacts me either from the IBM site or sites like yours…..

IBM’s “Websphere Everyplace Micro Environment” (WEME) conforms to the Java ME specification and is available in both of the JavaME defined configurations. For small volumes business deployments low volumes ( 1- 10’s) and individual copies for personal use, the IBM Java ME virtual machine (WEME) may be purchased from our business partner, Handango for $25 USD per license (device).. All of our Java runtimes that are available from Handango are Java ME certified and we provide solutions for various Java ME profiles and operating systems. These are made available “as is” - no support. (this means you will be on your own using forums on the web). WEME is based on IBM’s J9 Virtual Machine technology.

Our WM5 runtime works just fine on PocketPC 2003, PocketPC 2003 SE and WM6. Our WinCE 5 runtimes will run on WinCE 4.2 but NOT on WinCE 6.

There are actually 2 Java ME configurations and IBM supports both of them. It is important to use the one that supports your application and specific device type.

CLDC+MIDP (for Midlets)
or
CDC+Foundation+Personal ( for Applet/Applications)

Note that we no longer support CDC 1.0, Foundation 1.0 and PPro 1.0. We have moved up to the 1.1 versions.

Also, we do support Smartphone (button navigation - no touch scree) but only with MIDP. Our PPro implementation requires a touch screen.

Our Windows Mobile JVM’s are written to the ARM instruction set and will work on any ARM based processors such at the Intel PXA 2xx, TI OMAP, Freescale and Samsung processors that run WM5/6 or WinCE.

Please note that these runtimes from Handango are provided “As Is” with no warranty or support expressed or implied. Our Business Partners can provide Licenses and support for a fee.

MIDP 2.0 for Windows Mobile 5 Smartphone
(button navigation - no touch screen):
http://www.handango.com/PlatformProductDetail.jsp?siteId=1&osId=855&jid=121FDF13D35AC718E2C9768DDFFC3E5X&platformId=11&N=4294921609&Ntt=websphere&R=203653&productId=203653

MIDP 2.0 for Windows Mobile 5 PDA and Phone Edition devices with QVGA Screen Resolution
(PDA style touch screen device - low or standard resolution screen 320×240):
http://www.handango.com/PlatformProductDetail.jsp?siteId=1&osId=849&jid=121FDF13D35AC718E2C9768DDFFC3E5X&platformId=2&N=4294923386&Ntt=websphere&R=203649&productId=203649

MIDP 2.0 for Windows Mobile 5 PDA device with VGA Screen Resolution
(PDA style device - high resolution touch screen 640×480):
http://www.handango.com/PlatformProductDetail.jsp?siteId=1&osId=807&jid=121FDF13D35AC718E2C9768DDFFC3E5X&platformId=2&N=4294926649&Ntt=websphere&R=203654&productId=203654

Personal Profile 1.1 for Windows Mobile 5 PDA device with Touch Screen
(PDA style device - touch screen) :
http://www.handango.com/PlatformProductDetail.jsp?siteId=1&jid=734756B7A126CXFF4483XD5B5D82CEA4&platformId=2&N=0&productId=204403&merch=more_author_titles&HDGO_ad=mat_204403&HDGO_au=1&HDGO_ae=c

Personal Profile 1.1 for Windows CE 5.x PDA device with Touch Screen ( WinCE 5 Professional - not WinCE Core)
(PDA style device - touch screen):
http://www.handango.com/PlatformProductDetail.jsp?siteId=1&jid=734756B7A126CXFF4483XD5B5D82CEA4&platformId=2&N=0&productId=212765&merch=more_author_titles&HDGO_ad=mat_212765&HDGO_au=1&HDGO_ae=c

When downloading from Handango, you may get a warning that says this is incompatible with your device. Please ignore this warning and click though to complete your transaction.

The file you download is a Windows/x86 Install shield (EXE) that you must run on your PC. It presents you with the License Agreement and then copies the files to your PC. You then have to manually copy the LIB and BIN directories to your device using ActiveSync. Unfortunately, we do not provide a CAB files on some of our runtime packages. This is also something that our Business Partners could provide.

Unfortunately, you are correct about the Palm JVM.

IBM does not have the licensing rights to distribute the PalmOS version of Websphere Everyplace Micro Environment (WEME) the JavaME JVM. The port was done under license by PalmSource who was acquired by Access in Japan. several years ago. I believe that Palm’s license with Access has now run out and that is why Palm has removed the runtime form their WEB site. On top of this, Access has also dropped their agreement with IBM.

Regards, Fred

And some extra information:

A lot of the people that install the CDC-PPro JVM don’t realize they have to create a LNK file to get their application loaded and running. Here is the note I send for that:……….

Here are a couple examples of Windows Mobile shortcut (LNK) files…..

This link will open a console window so you can check for any errors:

255#\path\bin\j9.exe -jcl:ppro11 -cp \path\my-app.jar my-app-main-class

These example links will run without a console window:

255#\path\bin\j9w.exe -jcl:ppro11 -cp \path\my-app.jar my-app-main-class

255#”\my path\bin\j9w.exe” -jcl:ppro11 -cp “\my path\my-app.jar” my-app-main-class

If the JVM files are organized into a path structure of:
\path\bin\jvm-exe-dll-files
\path\lib\jvm-class-library-files
then paths to the jvm class library files are not required in the LNK file.

All LNK files must conform to the following rules….
1 - if any parm includes a space char then the entire parm must be inside double-quote marks
2 - the entire command line must be on 1 single line, multi-line LNK files are not permitted
3 - the entire LNK file must be no more that 255 bytes max, must shorten commands or paths if longer

Regards,
Fred

by markus

Mac OS X applications (update)

Saturday, January 26th, 2008 at 12:34 am

I am using the OS X system now for about 2 year. Before, I was for many many years on Linux (Debian), but the ongoing "tweaking" addiction was too time consuming. Once I started with my PhD I thought it might be a good idea to cut down on this this and focus on the real work ;)

My initial 2-3 month on OS X where not that great, considering that I was expecting a Linux with a nifty interface. Some things are just different, but after the initial hurdle I like the system today. A Unix which just works. Nice in a way.

Here is “my essential applications” list; some of them are OpenSource, some are commercial. Surely, OpenSource is a wonderful thing and I contribute to a few projects myself, but I am still willing to pay for good commercial applications!

System:

  • MacPorts project (all the great stuff from the OpenSource world)
  • Fink (too outdated, use MacPorts)
  • Quicksilver (the most essential tool you need handy; connects with many apps)
  • Jumpcut Clipboard Buffering (the name says it all, it is great)
  • Growl (notification system inter-connecting with most apps)
  • SimplyBurns (nice CD/DVD burning interface; better than onboard tools)
  • SuperDuper (perfect backups, but I don’t use it since I have TimeMachine)
  • Chicken of the VNC (only if you want to work remotely on other machines via VNC)
  • Microsoft Remote Desktop Connection (RDC) (only if you want to work remotely on other MS machines)
  • GrandPerspective (perfect for getting an idea of how HDD space is occupied)
  • MenuMeters (great tool informing you about HDD, CPU, memory & network status)
  • KeePassX and/or TrueCrypt (passwords to save ?)
  • VMware Fusion (virtualisation)
  • CoconutBattery (inspect the performance of you laptop battery)
  • Font Book (inspect your installed fonts)
  • Key Codes by Peter Maurer (find out about key mappings)
  • pearScriptKeys (make you own global hot keys)
  • TinkerTool System (various system level maintainance stuff)
  • sshfs (transparently connects a remote files system via SSH to your machine, handy)
  • ExpanDrive (faster and a bit more reliable than sshfs, but commercial)
  • iDefrag (fragmented hard drive ? Use this tool. However, HFS+ hardly fragments in the first place :)
  • LittleSnitch (personal firewall)
  • RCDefaultApp (assign default applications for certain file types; System preferences)
  • GnuPG & GPGMail (gpg mails & texts)
  • MondoMouse (mouse super power - that’s what they claim)
  • Tech Tool Deluxe (part of Apple Care Protection Plan)
  • Rember (a frontend of memtest; unlike memtestosx free of charge)
  • Spanning Sync
  • Typinator
  • Default Folder X (a must have!)
  • ToggleHiddenFiles
  • Name Mangler
  • Service Scrubber
  • Lab Tick
  • MarcoPolo
  • OpenTerminalHere

Work:

  • Evernote, CircusPonies Notebook 3
  • Bookends (reference management; Papers is a good alternative apparently)
  • OmniGraffle (Awesome application for vector graphics, e.g. for making posters etc)
  • Keynote (do you need to present your work, then this is for you)
  • LaTeX packages, TexShop, LaTeX2rtf
  • Mellel (great for technical and scholar writing; I use it for papers where LaTeX is over the top)
  • OpenOffice 3.1 (horrible big beast, but at times you need to open Office documents)
  • Skim (the very best pdf viewer ever)
  • Apple Development Tools (essential if you do any development on your machine)
  • Your favorite programming languages, myself Java, Perl and bit of Ruby & C++
  • IntelliJ and Eclipse (both good IDEs for Java, I use the latter also for Perl & C++)
  • TextMate, MacVim (my favourite text editors)
  • MySQL, DbVisualizer (database stuff)
  • R project (the ultimate free statistics environment)
  • XMind
  • AntiRSI (keeps you healthy - sort of)
  • iFlash

Media:

  • Adobe Photoshop CS3 (thankfully students get better rates :)
  • Adobe Lightroom (great for working dynamically on RAW camera files)
  • DNG Profile Editor
  • iMovie HD (the old version 6 - forget about the new crippled iMovie versions)
  • NeatImage PS plugin (get rid of noise in your pictures)
  • Spyder3 Elite (do you need a calibrated monitor ? This set works well)
  • HoudahGeo (geo tagging)
  • RouteConverter 1.11 (converting various GPS files; only the old version works on Java 5)
  • exiftool (A command-line interface to Image::ExifTool)
  • Google Earth
  • VLC (plays literally every media file)
  • iShowU (screen cast program)
  • Audacy (some audio work to do ? Record from the mic ?)
  • ImageJ & API (nice if you do imaging with Java, used it in one of my science projects)
  • Last.fm (the new form of radio these days ?)
  • Comic Life (the need to draw a comic quickly ?)
  • Incscape

Web stuff:

  • Firefox, Camino, Opera & Safari
  • Cyberduck (FTP & SSH; itegrates with Textmate)
  • Paparazzi! (screenshots of a certain URL, can be handy)
  • Skype (text, voip & video chat)
  • GalleryRemote
by markus

Noisy headphone jack on your computer ? This might help !

Sunday, November 18th, 2007 at 1:14 am

Problem:
Do you experience a “noisy” sound or some sort of “clicking”, “popping” or even “hissing” from your headphones if connected directly to the headphone jack ? Especially highly sensitive headphones (low impedance) that run rather loud even at low volume settings can be prone to show these effects, since the soundcard’s signal/noise (S/N) is usually worst at low volume settings.

I had particular problems with my Macbook Pro in combination with some Sennheiser headphones. The Powerbook I used before was “better” handling these headphones. Anyway, let’s look at a simple solution which might help you as well …

Solution:
You select around 80% volume on you computer and externally turn the volume down to an acceptable volume level using an external headphone extension cord with volume control. By doing so, the S/N of the audio signal is maximised and you get surprising clear and clean sound quality. I was actually blown away with this solution and the results it produces. I have never ever experienced such a clean audio out from a computer. I even considered a high grade external DAC (Digital/Analogue Converter) because this issue drove me so mad.

So if you do care about audio quality just a little bit (I am not an Audiophile), you might want to try this very very cheap and simple solution and buy a headphone extension cord with integrated volume control which costs around 5£. Good luck !

Posted in Products
by markus

Remote printing via SSH

Thursday, July 5th, 2007 at 5:21 pm

Ever thought it would be a good idea to print via SSH maybe because you cannot connect to your favorite printing machine in any other way ?

It is straight forward to do; you establish a ssh tunnel to your machine, e.g. via a ssh gate into your company or institute:

ssh -L2222:internal.machine.name:22 -l userName gateAddress

Now you can simply run any command on the remote side and hence can trigger a printing job:

cat document.pdf | ssh -p 2222 localhost "acroread -toPostScript | lpr -PprinterName"

DONE :)

PS: acroread works much more reliable than pdf2ps, I don’t now why. psf2ps screws up with some documents.

by markus

Expobar Brewtus II

Sunday, April 22nd, 2007 at 8:33 pm
Brewtus

I never thought to buy such a serious coffee machine. I was quite happy with Silvia (Rancilio), but I got an unbelievable good offer for Brewtus 2 (almost half price, but cutting out warrenty which I don’t need - I can fix the electronics myself and the plubming are also standard parts). Brewtus is a dual boiler machine (1.5 l each!), providing rock stable brew temperature while having steam instantly from the second boiler ;)

The brew boiler is electronically adjustable in 1 ºC increments, allowing for subtle changes for different coffee blends and roasts. The temperature stability is further supported by an E61 system that is using a thermosyphon circuit to heat the grouphead.

All this makes it a big step forward from Silvia (single boiler with about 300ml, passiv group heating), especially in terms of consistency. Surely, milk drinks are very easy to serve now as well ;) In my opinion only the legendary LM GS3 can top that machine, but that is surely too much for an amateur! There are a few similar dual boilers around, e.g. the La Spaziale S1 or Reneka Techno, but both with a significantly higher price tag …

Gene Cafe Roaster

I fitted a new OPV (OverPressureValve) for Brewtus, that allows me to adjust the brew pressure to my own preferred setting. That part is available from BellaBarista in the UK, which have an extremely good reputation for their products and support. However, as far as I know the newest Brewtus II machines already come with a fitted new OPV that is adjustable.

You might hear some more news about Brewtus in the future in my coffee section :)

PS: Of course the roasting season outside has started, instead of roasting under the hood in the kitchen! Currently I try all sort of green beans from HasBean and also his very good blends. Today I roasted his Has Bean Espresso Blend and the Cop Of Excellence Blend.

Posted in Espresso
by markus

New CUGC Website

Friday, March 30th, 2007 at 9:39 pm
cugc

Since I am the webmaster of CUGC (Cambridge Univeristy Gliding Club) for the year 2007, I have used Drupal to create us a nice small CMS (Content Management System) that we can all use easily and keep the website up2date.

Although HTML or XML is straight forward for some people, it is not quite as accessible as it seems. My idea was to allow people the most simplistic environment to write articles, news or add events. Drupal has proven itself a very valuable CMS system and I believe it was a good choice (well, the others think that as well :)

I have used Typo 3 before which would have been overkill and I used Wordpress (this blog) before, which is not quite a CMS for a group of people. Learning Drupal was straight forward, a couple of evenings and the website was ready to replace our old HTML/XML system …

So, for all gliding students of the University of Cambrige and for all interested people: http://www.cugc.org.uk.

Posted in Gliding
by markus

Folding Bike :)

Wednesday, January 24th, 2007 at 6:09 pm
Works OK :)
Folding Bike

I always liked to have a folding bike, but these things are usually expensive. However, currently the eBay market is flooded with “IKEA” bikes. I got mine for about 60£, so really a good price.

After messing a bit around and some test rides, all I can say: A folding bike is cool. You can take it very easily on the bus or train and is powerful enough to cycle some miles. My main “application” will be the trip to the local airfield ;) So I can jump on the bus for 40min or so and then cycle the rest …

You can’t compare it with the expensive folding bikes though, but that’s not what I was looking for. I only need it presumably 10-15x a year, so no need for an expensive toy. Highly recommended for any occasional folding biker ;)

Posted in All, Products
by markus

Howto install QT 4.2 and QtRuby 1.4.6 on Mac OS X Tiger

Monday, October 16th, 2006 at 6:30 pm

I had some (minor?) trouble to get QtRuby 1.4.6 and QT 4.2 running on my Mac (PowerPC, 10.4.8). However, with some help from Richard Dale (thank you!) and the Korundum forum I got it working.

Install QT 4.2

First, download QT 4.2 for your Mac. Unpack it and configure it with at least the “-no-framework” option, the remaining parameters are as far as I know up to you. And DON’T use the -prefix option (some people recommended this to put it in /Developer/qt), otherwise QtRuby 1.4.6 won’t find the QT stuff (Default installation path of QT is currently /usr/local/Trolltech/Qt-4.2.0).

>  ./configure -no-framework -system-zlib -qt-gif -qt-libpng -no-debug \
            -no-stl -no-exceptions -fast
 
>  make
>  sudo make install
>  export QTDIR=/usr/local/Trolltech/Qt-4.2.0
>  export PATH=$QTDIR/bin:$PATH</code>

Install QtRuby

Note: This is only to get version <=1.4.6 to work !!!

  • Fix missing headers - don’t link them, copy them (otherwise the build script will fail!)
    > sudo cp /usr/lib/ruby/1.8/universal-darwin8.0/*.h /usr/lib/ruby/1.8/powerpc-darwin8.0
  • Check out some updates of kalyptus we need to add to QtRuby Release 1.4.6
    svn co -r 588725 svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings/kalyptus/
  • Download qt4-qtruby 1.4.6 and unpack
  • Copy from the previous svn checkout the files “kalyptus” and “kalyptusCxxToSmoke.pm” into the kalyptus folder of qtruby
  • According to this article we need to comment out the main() function of qtruby/bin/qtrubyinit.cpp
  • In the root of qt4-qtruby you run:
    > ./configure --with-smoke="qt" --enable-mac --with-qt-dir=/usr/local/Trolltech/Qt-4.2.0 
    > make
    > make install
    > cd /ruby/lib/ruby/site_ruby/1.8/powerpc-darwin8.0 
    > sudo mv qtruby.so qtruby.bundle
  • Test your Qt installation:
    > irb
    irb(main):001:0> 
      require 'Qt'
      a = Qt::Application.new(ARGV)
      hello = Qt::PushButton.new("Hello World!", nil)
      hello.resize(150, 50)
      hello.show()
      a.exec()

Enjoy playing with QtRuby ;)
Thanks to all developers making this possible and thanks for the support!

by markus