Archive for the 'Personal Profile' Category

What the crowd liked: Pervasive Java presentation to NJCCPS

Tuesday, May 22nd, 2007

I gave a presentation on Pervasive Java, which includes some consumer Java APIs like BD-J and OCAP Java, to NJCCPS (New Jersey Chinese Computer Professionals Society), one of the largest Chinese associations in the east coast. I took the tack of more pictures and demos, less code, which is always a good thing, especially since many in the crowd were not coders.

The response was pretty enthusiastic, with the host having to stop the questioning after the 10 minute time alloted for questions had run past into the 20s, and with some people asking that a SIG be formed to focus on these technologies. One thing I noted was that many were more interested in the Sun SPOT sensors, probably because I had brought some with me to demo. You can find the slides here.

Some like it SMALL

Saturday, April 28th, 2007

We have grouped together a series of websites exploring different aspects in the pervasive java development community. Hopefully, people will find such resources helpful in understanding the rational and work involved when exploring these new fields.

Lurker’s Guide to Pervasive Java

Migrating from PersonalJava to the CDC (Personal Profile)

Thursday, April 20th, 2006

There are resources to help developers who have developed for the obsolete PersonalJava migrate their applications to the new CDC environment. Granted, I don’t believe there are really that many PersonalJava apps lying around, but those who have developed in this area may want to read this interesting article by Eric Giguere.

I’ll highlight below one of the more relevant passages from his work.

Applications written to the PersonalJava specification have a J2ME migration path to the Personal Profile (or, in some cases, the Personal Basis Profile). The migration is not seamless, because there are differences between the two Java environments. For an experienced Java programmer, however, the transition is not hard to make, and you end up with an application that uses the more familiar J2SE 1.3 APIs instead of the older (now quite dated) Java 1.1 APIs.

The following packages defined by the PersonalJava 1.2a specification are the same as, or subsets of, the packages of the same name in the Personal Profile:

  • java.applet
  • java.awt.datatransfer
  • java.awt.event
  • java.awt.image
  • java.io
  • java.lang
  • java.reflect
  • java.net
  • java.security
  • java.security.cert
  • java.security.interfaces
  • java.security.spec
  • java.text
  • java.util
  • java.util.jar
  • java.util.zip

Note that java.awt is not in this list. PersonalJava includes the PrintGraphics and PrintJob classes from this package, while the Personal Profile does not. With these two exceptions, however, the PersonalJava java.awt package is a subset of the Personal Profile java.awt package.

If your PersonalJava application limits itself to using the packages listed above (including java.awt without the printer classes) it should work unchanged. The only place that you might run into difficulty is with deprecated methods, because the Personal Profile does not include the deprecated methods of Java 1.1.8 other than those in the AWT classes.

The other packages included in PersonalJava are not found in their entirety in the Personal Profile. In particular:

  • The design-time classes are missing from the java.beans package.
  • PP does not support RMI unless the RMI Optional Package is present. (Note that RMI is optional in PersonalJava.)
  • PP does not include any JDBC classes from the java.sql package unless the JDBC Optional Package for CDC/Foundation Profile (JSR 169) is present. (Note that JDBC is optional in PersonalJava.)
  • PP does not support the PersonalJava-specific APIs in the com.sun.awt.com, com.sun.lang, and com.sun.util packages. Code that uses these must be rewritten to use the nearest Personal Profile equivalent.

These differences are the reasons that the transition from PersonalJava to the Personal Profile may not be seamless. Some of the changes are quite minor, though. For example, no method in the Personal Profile will throw com.sun.lang.UnsupportedOperationException. Others entail more work, such as replacing use of com.sun.util.PTimer with use of java.util.Timer.

CDC 2006: Ready. Set. Go!

Friday, April 7th, 2006

I admit it. I’ll be buying the brick that’s called the Nokia 9300 from Cingular not because it has an awesome 640 x 200 pixel screen when opened up, but because I’m curious about messing around with the Personal Profile packaged with this luscious telepono muy bueno.

In fact, my interest in Java ME’s long-neglected CDC has started again after it waned when I realized Sun’s last documentation for it was written in 2002, and that the only reference implementation was for Linux!

It seems this year may finally see the light dawning on this configuration. Not only are there several enterprise-capable smartphones showing up that boasts the Personal Profile like the Sony Ericsson P990 and Sony Ericsson M600 (both of which unfortunately, unlike the Nokia 9300, do not seem to be headed for US shores), but Blu-Ray devices will be shipping this year with the new BDJ specs that use the Personal Basis Profile (Xlets)!

So, for those people who’d like to play around with this big brother of Midlets, first stop is the NetBeans Mobility Pack 5.0 For CDC, which also has some getting started guides and other nifty documentation. Go get it before it gets really hot people!