Symbian
Symbian OS Library

FAQ-0553 I can't get the "Quick Start" Hello World example to work on emulator - Quartz 6.0 SDK for Java documentation

[Index][spacer] [Previous] [Next]



 

Classification: Java Category: Emulator
Created: 01/04/2001 Modified: 07/22/2003
Number: FAQ-0553
Platform: Symbian OS v6.0, Symbian OS v6.1

Question:
I can't get the "Quick Start" Hello World example listed in the Quartz 6.0 SDK for Java documentation to work properly. The Hello World window appears momentarily and then disappears beneath the application launcher screen.
C:\Symbian\6.0\Shared\DeveloperLibrary\Quartz6.0Java\NavigationPage_QJava\QuickStart\15_Minute_Guide.html


Answer:
The problem occurs because on starting the Emulator numerous threads are created, one of which is the Hello World application, another of which is the Application Launcher. Normally the (small) Hello World application finishes loading before the Application Launcher. Hence the Hello World screen is overwritten by the Application Launcher screen.
  • A solution is to pause the main thread of the Hello World application by ammending the the main() method as shown below:

public static void main(String[] args) throws InterruptedException
{
    Thread.sleep(15000);
    Hello hi = new Hello();
}

This allows time for the Application Launcher thread to finish loading before the Hello World thread. This solution is used by the example apps on the Quartz SDK for Java.
  • An alternative solution is to switch to the debug emulator (udeb) in which case ctrl-shift-alt-T will bring up the Task List allowing HelloWorld to be foregrounded.

  • This effect can also be achieved by installing a Task List control from the SDN Web site

http://www.symbian.com/developer/downloads/tools.html#tasklist

and launching it from the Control Panel, allowing a given application to be foregrounded using either the debug (udeb) or release (urel) emulator.