TRL
TOP PAGETokyo Research LaboratoryEmploymentProjectsRelated InformationIBM Research

FAQ - Questions about aglet programming

Aglets Image



Q:Are there any sample programs for ASDK?

A:You can find some example programs in the download package in your "examples" directory. Only source code is available and no detailed description is provided.

Top of Questions about aglet programming

Q:How can I compile and run my own aglets?

A:Please follow the steps below:

1.Define your aglet to be included in the package my.aglets. (my.aglets is just a package name example.)

2.Define a corresponding subdirectory path my\aglets under a directory DIR (possibly the original c:\.....Aglets1.0.3\public).

3.Include DIR in AGLETS_PATH and AGLETS_EXPORT_PATH (if it is not there already).Note: There is NO NEED TO MODIFY the classpath directory.

4.Compile your aglet files into DIR\my\aglets, using the javac "-d" and "classpath" options. Learn more about packages and javac, if necessary. As the result of compile, let us assume, you have a file newAglet.class

5.Run Tahiti and create your aglets. Use my.aglets.newAglet as the aglet name in the create aglet panel.

More precise descriptions are in the Install Guide.

Top of Questions about aglet programming

Q:How can I pass more than two arguments to Aglets as initial arguments?

A:The class of the initial argument for CreateAglet() is Object, you can use the Vector or Hashtable class to pass a composite object as an initial argument.

Top of Questions about aglet programming

Q:My aglet does not carry its own data. Can you give me any advice?

A:First of all, all of your data must be Serializable. Next, check if the variables are not declared as "static" or "transient". Variables declared as "static" or "transient" are not serialized. (This is the nature of Java Object Serialization.)

Top of Questions about aglet programming

Q:How can I create an aglet that has a different codebase within another aglet?

A:The current security policy is on codebase, and does not allow an aglet to create another aglet whose codebase is different. Please use -nosecurity for the time being.
It will be configurable in the future.
[NOTE:] If you want to try this, please remember that you do so at your at your own risk.

Top of Questions about aglet programming

Q:When I transfer an object as a massage argument, ClassCastException is thrown. Am I doing something wrong?

A:When objects are transferred as message arguments, their code is not transferred along with them. Consequently, unless the code already exists at the destination (e.g., JDK or ASDK classes), it fails to cast these objects with non-existing classes.

Top of Questions about aglet programming

Q:Is there are any upper limit on the number of aglets that can live in the same context?

A:In the current implementation there is no restriction on the number of aglets. Since the server assigns (at least) one thread to one aglet, and some JVMs (or OSs) have  limitations on the number of threads that can be created within a process, there could be some upper bound.

Top of Questions about aglet programming


Research homeIBM homeOrderPrivacyLegalContact IBM
Last modified 14 March, 2002