applications to be better tested on a PC. The emulator mimics the
operation of a real S60 device so accurately that applications can be
developed even before the required S60 device is available.
The S60 emulator allows you to switch between concurrently running
native and Java applications (see Figure 5.4), change the device settings as
you would on a real device, use the native S60 browser, insert contacts to
the native contacts database, manipulate files on the emulator file system,
and much more. This is a powerful feature that cannot be matched by a
generic emulator: it is as close as possible to a real S60 device.
Figure 5.4 Using the Task Manager to switch between applications
5.3.1 Running MIDlets on the S60 Emulator
When you launch the MIDlet from NetBeans, the progress dialog in
Figure 5.5 appears. If there is more than one MIDlet in your suite, you are
asked to choose one of them (see Figure 5.6). The S60 emulator starts an
application called DebugAgent whose role is to manage debug sessions.
The DebugAgent display shows the launch progress (see Figure 5.7) until
the MIDlet becomes active and is sent to the foreground.
In order to speed up the development cycle, you can keep the emulator
running throughout your development session; you do not need to restart
the emulator for every debug session. The first time you launch an
application from NetBeans, the emulator starts the Java DebugAgent
running to handle the installation and lifecycle of debugged MIDlets.
After terminating the debug session, you can leave the emulator running
and the DebugAgent waiting for the next MIDlet launch. Rebuild the
debugged application from the IDE and re-launch the application in the
emulator. To stop the execution of your application without closing the
S60 emulator, press Abort on the progress dialog.