Monday, June 23, 2008

The Greatests

The greatest achievement is selflessness.
The greatest worth is self-mastery.
The greatest quality is seeking to serve others.
The greatest precept is continual awareness.
The greatest medicine is the emptiness of everything.
The greatest action is not conforming with the worlds ways.
The greatest magic is transmuting the passions.
The greatest generosity is non-attachment.
The greatest goodness is a peaceful mind.
The greatest patience is humility.
The greatest effort is not concerned with results.
The greatest meditation is a mind that lets go.
The greatest wisdom is seeing through appearances.

Wednesday, June 11, 2008

First Java ME Research

Okay, here's what i've found with our Java ME's demo app to run in my ipaq since my first blog.

At last i've found a suitable JVM for my Java ME purpose. It's Creme JVM from It supports some important features that i seek :
* Memory usage up to 128M. So if you're developing a mobile app which is quite significant in size or data, you should consider buying a pocket pc with bigger user memory (user memory is not to be perceived to be the same as RAM, be careful !) and run it using creme.
* Can run full screen !
* Can activate GPRS connection from cremex extension library
* Supports swing via JSR 209 (AGUI). Creme provides this as extension CAB file that can be installed after the installation of creme jvm in the pocket pc.
* Supports JNI, especially important for native printing

Here are some requirement of the CDC demo app i'm working on :
0. Rich user interface
Creme supports Swing ! No it's not slow, nor that it's fast. It's working just fine to me :)
1. Starts automatically, full screen when the ppc is activated
This is accomplished easily by putting the lnk file to the startup folder in the windows mobile directory
2. The app always stay on top
Creme also provides an extension class that can make it always stay on top.
3. Must be able to sync via WiFi
I just need to use or Apache HttpClient's library to connect to a servlet, fetching or downloading data.
4. Must be able to sync via GPRS with HTTPS with custom generated certificate
To be able to activate GPRS is already provided from from cremex extension library. Creme also got HTTPS support using jsse 1.0.3. One just need to place it in the creme\lib\ext directory. I tried for this HTTPS thing and it works nice, but using the apache httpclient is still problematic. The httpclient seems to be unable to find the SSL implementation.
5. Got embedded database
Apache Derby Rocks ! It supports CDC 1.0 and 1.1 in newer versions !
6. The app cant be closed by the users, only by those admins with the correct passwords. So the menu File -> Exit will prompt for a password. Wrong password takes you back to the app screen. This can be easily achived in Swing.
7. H/W keyboards wont be usable, like the camera button, the windows button that could trigger the start menu activation, etc. Only virtual keyboard will be usable. This is not supported by Creme yet by default, but Creme's support told me that this is going to be easily added if i were to become their customer, he he ..
8. Being able to print transactions on the field. We use Datecs PP-55 thermal printer for this necessity. The people from Datecs is kind enough to give me a sample of CPP source for text printing, and i use JNI calls for that. Works like magic.

Find out how to combine netbeans mobility pack with creme vm here. You should find this helpful as netbeans provides you some easiness like :
- It's an Java IDE, so you get all the quick fix, auto completion, refactoring, etc.
- Make one jar that consists of your classes and all the third party jars needed to run your program to be copied later to pocket pc.
- It has a GUI Builder that is suitable to design swing screens. To use the GUI Builder really helps you develop patience .. haha, but still a blessing than coding it manually.

I'll keep posting for updates.