This describes how you can add optional JSR implementations in MicroEmulator.
Initialization interfaces are designed to properly register extensions during MicroEmulator start. This may be required to get privileged AccessControlContext in WebStart. Extensions may have notifyMIDletStart() and notifyMIDletDestroyed() callbacks to close all open connections or report to developer that application still have some open connections. Main extension class can implement interface org.microemu.microedition.ImplementationInitialization then it will receive property Map as parameter when registerImplementation is called. Or Extension can be class that does not implements org.microemu... interfaces then it is just created if it has public constructor or class static method instance() is called.
For compleate JSR implementation and GCF extension example see sources in module microemu-jsr-75.
In addition to initialization in MicroEmulator command line --impl (JSR implementation class name) config file can be used.
<config>
...
<extensions>
<extension>
<className>org.microemu.cldc.file.FileSystem</className>
<properties>
<property NAME="fsRoot" VALUE="C:/tests"/>
</properties>
</extension>
<extension>
<className>com.intel.bluetooth.BlueCoveImpl</className>
</extension>
</extensions>
...
<config>Using --id EmulatorID command line option you can initialize extensions differently for different instances. For example JSR-82 emulator would have different Bluetooth addresses or jsr-120 would have different SMS Numbers.