Skip to main content

Phoneme + knopflerfish issues

5 replies [Last post]
tkazi
Offline
Joined: 2008-05-14

Hi guys, first of all I want to say thanks for any help I can get on this. I'm having fun with a project putting CVM and knopflerfish on an embedded platform, and I have a cvm built and loading knopflerfish just fine.

However my test OSGI bundles fail to load in the framework complaining of a missing java.lang.stringbuilder class. I built CVM using the b34 release. My javac was the Sun 1.6 distro and I am using a cross compile uclibcgnueabi target cc. When trying to mess with the -target and -source options to get compliance for recent specs of Java, the build process complains of the lack of access to the class library java.lang.stringbuilder.

Compiling build-time classes...
../../src/share/javavm/classes/java/lang/Object.java:228: cannot access java.lang.StringBuilder
class file for java.lang.StringBuilder not found
return getClass().getName() + "@" + Integer.toHexString(hashCode());
^
Note: Some input files use or override a deprecated API.

Is this an issue already solved by a recent dev release? or am I forced to rewrite my OSGI code to work in a 1.4 environ for now?

Thanks again,
Fique

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ken_gilmer
Offline
Joined: 2007-01-19

Fique,

I know that both Felix and Concierge run on PhoneME Advanced unmodified.

hth
ken

cjplummer
Offline
Joined: 2006-10-16

All cdc classes need to be built with javac 1.4.x, or if you use a newer version of javac you have to specify "-source 1.4 -target 1.4" when running javac.

chris

tkazi
Offline
Joined: 2008-05-14

Alright I think I understand the build defaults now. But with my OSGI Bundle requiring java.lang.StringBuilder, I was wondering if there was a way for me to add this class to the CVM?

So is this possible? already done? not on the roadmap? If StringBuilder is something I just cant use within PhoneME i would like to know that so I can rewrite my code.

Thanks in advance,
Fique

cjplummer
Offline
Joined: 2006-10-16

StringBuilder has not been added to CDC, and would require a new CDC spec release to support. If the CDC spec gets rev'd to bring in Java SE 1.5 classes or later (I think 1.5 is when StringBuilder was added), then you would get StringBuilder support. It can't happen before then without breaking the spec.

Chris

tkazi
Offline
Joined: 2008-05-14

Thanks for all the help, this answers my question.

Fique