Skip to main content

Java 1.5 and 1.6 compatibility for Windows Mobile

1 reply [Last post]
trurl2812
Offline
Joined: 2009-03-03
Points: 0

Hi.

As far as I know, phoneME for Windows Mobile is java 1.4.2 compatible (correct me, if i wrong).

My question is: Is it intended to make the phoneME Java 1.5 or even Java 1.6 compatibel?

Thanks for your help and once again,
Davy, very nice job

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
davyp
Offline
Joined: 2007-01-03
Points: 0

I am assuming you are talking about class file format versions rather than classpath libraries,
right?

I usually compile phoneME Advanced applications with javac -source 1.4 -target 1.4, but if you
are not using any classes that are not inside the Personal Profile stack, then targetting 1.5 or
1.6 seems to work as well.

I tried this with some simple AWT applications, but I cannot guarantee that this will work for all
applications. I must warn you that you might quickly bump into an such a 1.5 dependency
depending on the compiler. For example, if you concatenate two strings in your code, then the
compiler might implicitly use the java.lang.StringBuilder class which is not supported by
Personal Profile:

javac -source 1.5 -target 1.5 -bootclasspath btclasses.zip:personal.jar PersonalProfileApp.java

PersonalProfileApp.java:64: cannot access java.lang.StringBuilder
class file for java.lang.StringBuilder not found
label.setText("Button pressed # "+(count++));

If you compile the application with the regular J2SE 1.5 boot classpath, the code might compile
but you will get a java.lang.NoClassDefFound exception at runtime.

Davy