Skip to main content

Building non CLDC application

4 replies [Last post]
faslam
Offline
Joined: 2008-01-19
Points: 0

Hi,

We can build CLDC using Squawk. However, when we try to build application developed using Jdk 1.6 then squawk gives error. I want to know that if creating suite file for non CLDC application is possible?

Thank you,

Faisal

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nomarior
Offline
Joined: 2009-06-15
Points: 0

Dear Derek,

which parts of the current Squawk implementation should I look at if I would try to enable dynamic classloading in Squawk?

Kind regards
Ramon

eric_arseneau
Offline
Joined: 2004-07-15
Points: 0

What are you trying to do?

We, about a year ago, decided to assume that classes would be loaded by another agent and a suite file would be created to hold the new code.

This does not mean that you can't add code dynamically. What it means is that your Squawk port will need to be able to load more than one suite. You could have your application in one suite, that depends on the bootstrap/core Squawk. Then if you wanted to add a new set of classes, then you could process them through the Romizer to create a suite containing these classes. Then get your port to load the new suite and your in business.

This would not necessarily require a restart of the VM, but it would depend on your port.

derek_white
Offline
Joined: 2006-09-08
Points: 0

No, Squawk is targeted at CLDC, not Java SE, or even Java ME CDC. There a several reasons for this:

- Trying to support the full SE libraries would make the resulting bootstrap suite much, much larger (MBs, not KBs).
- The static linking implied in the suite format, and the linking optimizations we do, start to fall down in the face of dynamic classloading.

These reasons are not insurmountable, but solving these issues are not high priority for us right now. It might be an interesting project for someone else though (hint, hint).

BTW, this is related to only supporting JDK 1.3 language features instead of newer features. The initial blocker is that when javac compiles to use the new features, it starts using java.lang.StringBuilder (which we don't implement) instead of java.lang.StringBuffer (which we do). Squawk has an unusual implementation of java.lang.String, so it would take a little work to get StringBuilder working (hint, hint :-). There may be other issues beyond this though.

- Derek

faslam
Offline
Joined: 2008-01-19
Points: 0

Dear Derek White,

Thank you for your reply.
I was really interested in seeing how good Suite optimizing works. I have produce results with CLDC. However, other than CLDC I am not able to find any program to create suite files and see how good it works. Do you know some programs which I can try (more the better)? I am not able to find big programs written using CLDC by googling and Squawk is not working with Java-SE programs.

Thank you in advance.

Faisal