Symbian
Symbian OS Library

FAQ-0462 My app fails with "Class not found" errors when launched from the emulator extras bar

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



 

Classification: Java Category: Emulator
Created: 01/07/2000 Modified: 06/25/2001
Number: FAQ-0462
Platform: Not Applicable

Question:
My app runs fine on real hardware but fails with ClassNotFound or ClassDefNotFound exceptions when launched from the emulator extras bar. Whys is this and what can I do about it.

Answer:
This is a consequence of a known limitation of WINS recognizers, which are used to launch Java apps from the extras bar. A fix has been identified and will be incorporated into a future SDK release. The work around is to launch your apps with the java.exe or java_g.exe commands (from a DOS command prompt).

More specifically, the discrepancy arises in the (C++ object) heap limit for the VM between running a java program using any of the WINS recognisers, and running it from the command line or via a true EPOC recogniser (on an EPOC device). The java.exe and javarun.exe programs on target hardware specify a maximum heap of 32MB for the main heap, when java.exe (or java_g.exe) is run under WINS it has the emulator maximum heap size, but when java is run in response to a WINS recogniser, it is actually launched as a thread within the emulator with a maximum heap limit of only 2MB. This will cause problems for very large applications, and the class loader in the VM is known to translate failure-to-load into ClassNotFound and ClassDefNotFound exceptions.