Skip to main content

handheld device

3 replies [Last post]
Joined: 2007-06-25

i have developed an application for Inventory Control System in Java some years ago. The front end is in Java Swing and backend is Oracle 9i.
Now i want to develop the same application for PDA(Handheld device).
Does J2ME support PDA for such development. if yes, how is it possible?
What are the technicality i have to consider for this project. My project consume a lot of system resources (RAM, HD)
Thanking you in advance for your valuable comments.
Ali Raza

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-03-04

Just expanding to the previous answers: Developing for mobile devices really requires a different mindset in many ways. You need to rethink the user interface, the input methods, the network connectivity, the system resources, etc. Simply dropping a Swing app onto a device (if Swing is even supported there) will likely not be satisfactory.

You should start by considering the device platform you are targeting (the large number of mobile phones running MIDP, the much smaller number of PDAs possibly without a pre-installed Java stack, etc) and then analyse what features of your application even make sense on the selected devices. Once you've gotten to that point you likely have to redesign a significant part of your client app to make it work appropriately under mobile conditions.

-- Terrence

Joined: 2006-06-26

We have produced a java application that uses swing under windows PocketPC. We used the CrEme virtual machine from a company called NSICOM. Developing java on the PocketPC is increadably painfull, but can be made to work. AFAIK CrEme doesnt support swing streight out of the box, but you need to include an extra jar. Swing is farily slugish, however can be made to run reasonabliy on the latest hardware. Apart from just dealing with the various limitations and contraints of the development enviroment (missing classes and methods, can't debug on the handheld) the largest problem we experenced was changing our mindest from desktop development.

On the desktop your network is going to be up 99.9% of the time and the PC is never going to be turned off in the middle of an operation. On the handheld the wireless lan, can and will go down ALL the time, and users will turn of the handheld while it is half way through diong things. For example we found users were entering an order, clicking 'save' then immedieatly powering down the handheld and putting it in their pocket, even before the application had a chance to actually do anything. What a pain!

- Luke

Joined: 2003-06-15

There are several types of JVM clones, and now with opensourced PhoneME you can even build your own.

The 2 I've worked with are JamVm, and J9 (ibm), but there is another that I've heard good things about, Mysaifu JVM. Here is also a link to a very out-dated list of vm's for small devices:

I have also used another vm that uses Java to build the apps with but is not a Java VM. SuperWaba.

So here are the technical issues with taking a swing app to embedded. First there is no swing on embedded....some can support AWT. Then there is the resource issue. Most Swing apps use an incredible about of memory, which small devices don't have. Then there is the CPU speed, and while you might have enough memory, overly OOD apps will suffer in the embedded realm.

However do not feel that OOD in a JavaME realm is a bad thing, because it can actually work to your advantage, you just can go overboard, and some patterns need to be made lite.

If you have built your system using OO, then you should be able to pull most of your business logic out and just replace the view, and some of the model connections.

The biggest concern is to think of the devices you want to cover. If you want to support Palm & PocketPC & linux...then you may need to look at J2ME MIDP2. If just PocketPC, and Linux then JavaME CDC+PBP (in other words think java 1.1.8 w/awt). If keeping the Java-ish-ness is not overly important then SuperWaba has some powerful features that may be helpful, but they have a certain list of device that they support, and you should examine that before choosing.

Now for the big disclaimer....JavaME MIDP is not simple, and using the WTK tools can lead you into the feeling that everything is possible. But if you are using a cellphone/smartphone type device, and need to use the phone Carriers you are in for pains beyond your wildest dreams.

I've been doing this (embedded java) since 1999 (yes before kspot was published). It not an easy path, but if you can live in the limitations there are some cool things you can pull off if you can think outside the box.

Best regards