I wrote a MIDlet that does a few “advanced” things: selecting images from the Internet, resizing them, saving them on the phone, displaying them.
All this works fine in the Nokia S60 3rd Edition FP1 emulator. This device supports MIDP 2.0 and CLDC 1.1 (also JSR75, which I need to save files). It also works the same as it does on the Nokia E71 (physical device).
Then I tried to run MIDlet on several other emulators. One of them, DefaultCldcJtwiPhone2 from the Java ME SDK 3.0, also claims support for MIDP 2.0 and CLDC 1.1. It does not have a JSR75 that explains why "FileConnection cannot be allowed for a type."
This, however, does not explain why List.deleteAll (), String.equalsIgnoreCase (String), and some other undefined.
Actual errors I get:
- Ceil (double) undefined method for type Math
- The deleteAll () method is undefined for the type List
- EqualsIgnoreCase (String) undefined method for type String
- GetWidth () method - undefined for type Displayable
When I look at the MIDP 2.0 API (i.e. JSR118) ( http://java.sun.com/javame/reference/apis/jsr118/ ), I can clearly see that all of these methods are present, with the tag with "is either MIDP 2.0 or CLDC 1.1.
My question is : why does a MIDP 2.0 emulator not have access to all MIDP 2.0 methods? Or, alternatively, what am I doing wrong?
source share