Map API

Nutiteq Maps Lib SDK enables developing advanced mobile mapping applications.
Platforms: Android, RIM BlackBerry, Java ME (J2ME)
Download maps API SDK »
Untitled Document

Products

» View demos
» Downloads

Latest news

Last at Tue, 6 Dec 2011 18:37:53
Topic: New BlackBerry sample app
See more news »

I can not run the HelloMap example

30 replies [Last post]
mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

I followed the instruction in the site (http://developers.cloudmade.com/projects/j2me-lib/examples/simple-map) to build an example for display a map in a MIDLet application.
I went to the second step ("Simple map") and try to run the application ưith the hope that a map will be displayed on my Midlet screen before going further. However, I got an error message "Network error". It seems that my application could not connect to the library site.
Note: The Nutiteq license Key is handled with the same Midletname as well as Vendor name on my project's JAD file. I also got a Key for the CloudMade APIs

Following is that simple code. Any one can show me what I should do to fix this error?

public class HelloMap extends MIDlet implements CommandListener {
private Form mMainForm;
//private boolean midletPaused = false;
private MapItem mapItem;
public HelloMap() {
System.out.println("HERE0000");
// mapItem = new MapItem("Dispaly map", "tutorial", this, 232, 150, new WgsPoint(24.764580, 59.437420), 12);

//Using my own Nutiteq Key with Midlet-name and Vendor declared in the project's JAD file
mapItem = new MapItem("Dispaly map", "072b030ba126b2f4b2374f342be9ed444b178990e00534.27945151", this, 232, 150, new WgsPoint(24.764580, 59.437420), 12);
// mapItem.setMap(new CloudMade("LICENSE-KEY-REPLACE-ME",64,1));
//Using my own ClodMade Key
mapItem.setMap(new CloudMade("327af5de906f44c6bfd373eee5b7f50a",64,1));
System.out.println("HERE2");
mMainForm = new Form("Hello map");
mMainForm.append(new StringItem(null, "Hello, map!\n"));
mMainForm.append(mapItem);

mMainForm.addCommand(new Command("Exit", Command.EXIT, 0));
mMainForm.setCommandListener(this);
System.out.println("Start mapping...");
mapItem.startMapping();
System.out.println("END mapping...");
}

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

It can be general networking error or license error. License request errors in some cases also give "network error" messages. License check is done after loading first tiles, so if there is license issue, then you should actually see briefly first tiles, and then these are replaced by error message.

In any case, some networking troubleshooting ideas:
a) using logging within application. You have to turn on logging (to StdOut) in Nutiteq library with following lines of code:
import com.nutiteq.log.Log;
...
Log.enableAll();

b) trace externally: use Network Monitor which is bundled with WTK emulator. This shows successful HTTP requests and answers.

c) use lower level network monitoring tools, e.g. Wireshark.

Most probably connection might fail because you are behind a firewall. Go to WTK Preferences > Network Configuration > User Proxy Server and supply your proxy information (see http://java.sun.com/products/sjwtoolkit/FAQ.html)

/JaakL

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

Thank you very much,

I have configured the User proxy for the WTK (at the HTTP field and let the Security field blank). The error still "Network error".

Follows are some messages from the log:

Info > Downloading http://tile.cloudmade.com/327af5de906f44c6bfd373eee5b7f50a/1/64/12/2329/1202.png

Error > Error in task runner: Error initializing HTTP tunnel connection:
HTTP/1.0 403 Forbidden
Server: squid/2.7.STABLE6

Date: Tue, 08 Dec 2009 07:18:23 GMT
Content-Type: text/html
Content-Length: 1015

X-Squid-Error: ERR_ACCESS_DENIED 0

X-Cache: MISS from proxyyi04.sic.shibaura-it.ac.jp
Via: 1.0 proxyyi04.sic.shibaura-it.ac.jp:10080 (squid/2.7.STABLE6)

Connection: close

java.io.IOException: Error initializing HTTP tunnel connection:
HTTP/1.0 403 Forbidden

Server: squid/2.7.STABLE6

Date: Tue, 08 Dec 2009 07:18:23 GMT

Content-Type: text/html

Content-Length: 1015

X-Squid-Error: ERR_ACCESS_DENIED 0

X-Cache: MISS from proxyyi04.sic.shibaura-it.ac.jp

Via: 1.0 proxyyi04.sic.shibaura-it.ac.jp:10080 (squid/2.7.STABLE6)

Connection: close

at com.sun.midp.io.j2me.http.Protocol.doTunnelHandshake(Protocol.java:2101)
at com.sun.midp.io.j2me.http.Protocol.connect(Protocol.java:1984)
at com.sun.kvem.io.j2me.http.Protocol.connect(Protocol.java:30)
at com.sun.midp.io.j2me.http.Protocol.streamConnect(Protocol.java:1653)
at com.sun.kvem.io.j2me.http.Protocol.streamConnect(Protocol.java:52)
at com.sun.midp.io.j2me.http.Protocol.startRequest(Protocol.java:1634)
at com.sun.midp.io.j2me.http.Protocol.sendRequest(Protocol.java:1561)
at com.sun.midp.io.j2me.http.Protocol.sendRequest(Protocol.java:1517)
at com.sun.midp.io.j2me.http.Protocol.openInputStream(Protocol.java:484)
at com.nutiteq.net.DefaultDownloadStreamOpener.a(+223)
at com.nutiteq.net.DefaultDownloadStreamOpener.openInputStream(+8)
at v.a(+177)
at at.run(+264)
Debug > TW: create new worker
Error > Could not retrieve http://tile.cloudmade.com/327af5de906f44c6bfd373eee5b7f50a/1/64/12/2329/1202.png
Info > Downloading http://lbs.nutiteq.com/license.php?mykey=072b030ba126b2f4b2374f342be9ed444b178990e00534%2E27945151&app=HelloMap&vendor=Mobilitier&ver=1%2E0%2E2&platform=SunMicrosystems%5Fwtk&locale=en%2DUS&smsc=%2B12345678900
Error > Error in task runner: Error initializing HTTP tunnel connection:
HTTP/1.0 403 Forbidden
Server: squid/2.7.STABLE6
Date: Tue, 08 Dec 2009 07:18:23 GMT
Content-Type: text/html
Content-Length: 1009
X-Squid-Error: ERR_ACCESS_DENIED 0
X-Cache: MISS from proxyyi04.sic.shibaura-it.ac.jp
Via: 1.0 proxyyi04.sic.shibaura-it.ac.jp:10080 (squid/2.7.STABLE6)

Connection: close

I also turned on the Network monitor of the WTK and saw no signal.

Could you please give me some more hints

Thank you very much,

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

It looks like your proxy is for some reason blocking requests. Can you see e.g. http://tile.cloudmade.com/327af5de906f44c6bfd373eee5b7f50a/1/64/12/2329/1202.png directly with web browser?

Less probably cloudmade server is blocking it; can you try with other map servres? If you do not add setMap() call then OpenStreetMap general tile server is used. Does it give same error?

/JaakL

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

Both the sites work well when I open it directly by the IE or Firefox

http://tile.cloudmade.com/327af5de906f44c6bfd373eee5b7f50a/1/64/12/2329/1202.png
http://lbs.nutiteq.com/license.php?mykey=072b030ba126b2f4b2374f342be9ed444b178990e00534%2E27945151&app=HelloMap&vendor=Mobilitier&ver=1%2E0%2E2&platform=SunMicrosystems%5Fwtk&locale=en%2DUS&smsc=%2B12345678900

I also tried not to use the setMap() method. The error is not fixed

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

The key error is following:
X-Squid-Error: ERR_ACCESS_DENIED 0

Maybe the proxy configuration does not allow WTK as client device. I suggest to contact your firewall administrator to check why the Squid error comes.

/JaakL

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

Thank you very much. I also focus to this point and try to ask the administrator for his support.

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

Hi Jaak,

Thank you very much for your suggestion ideas. The administrator at my Univ. fix give my program a permission to connect to a service from outside sites via HTTP request. The program works well then.
Thank you again for your kind support.

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

I would like integrate the longitude and latitude read from GPS device into the "HelloMap" program to display the map at the current region. I wrote a program to read the GPS data from the serial COM port (COM3). But the data I got seems wrong as follows:
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
00,$GPGSV,3,3,12,16,00,000,,28,00,000,,26,00,000,,29,00,000,
$GPRMC,134749.052,V,,,,,,,151209,,,N*48
$GPGGA,134750.054,,,,,0,00,,,M,0.0,M,,0000*5$GPGSA,A,1,,,,,,,,,,,,,,,
$GPGGA,134751.059,,,,,0,00,,,M,0.0,M,,0000*5F

The data for $PGGA is something like this:
$GPGGA,134750.054,,,,,0,00,,,M,0.0,M,,0000*5
It seems only the time is reported. No lon, lat, nor any other data. In fact there is no (,00,) used satellite reported. I don't know why.
I have brought the laptop outdoor but I got the same thing.
Could you please give me some ideas about this?
For more references, the device is USBGPS2 (http://www.todaygadgets.com/2009/02/12/io-data-usbgps2smd9-usb-gps-receiver/)

And the code lines as follow:
package simpleread;
import gnu.io.CommPortIdentifier;
import gnu.io.PortInUseException;
import gnu.io.SerialPort;
import gnu.io.SerialPortEvent;
import gnu.io.SerialPortEventListener;
import gnu.io.UnsupportedCommOperationException;
import java.io.*;import java.util.*;

public class SimpleRead implements Runnable, SerialPortEventListener {
static CommPortIdentifier portId;
static Enumeration portList;
private final char CR = 0x0d;
static boolean stop = false;

InputStream inputStream;
SerialPort serialPort;
Thread readThread;

public static void main(String[] args) {
portList = CommPortIdentifier.getPortIdentifiers();

while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals("COM3")) {
// if (portId.getName().equals("/dev/term/a")) {
SimpleRead reader = new SimpleRead();
} }}}

public SimpleRead() {
try {
serialPort = (SerialPort) portId.open("SimpleReadApp", 1000);
} catch (PortInUseException e) {System.out.println(e);}
try {
inputStream = serialPort.getInputStream();
} catch (IOException e) {System.out.println(e);}
try {
// Thread.sleep(2000);
serialPort.addEventListener(this);
} catch (TooManyListenersException e) {System.out.println(e);}
serialPort.notifyOnDataAvailable(true);
try {
serialPort.setSerialPortParams(4800,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
} catch (UnsupportedCommOperationException e) {System.out.println(e);}
readThread = new Thread(this);
readThread.start();
}

public void run() {
try {
Thread.sleep(20000);
} catch (InterruptedException e) {System.out.println(e);}
}

public void serialEvent(SerialPortEvent event) {
switch(event.getEventType()) {
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;
case SerialPortEvent.DATA_AVAILABLE:
byte[] readBuffer = new byte[20];
int numBytes=0,i;
byte tam;
String strResult = "";
try {
while (inputStream.available() > 0) {
numBytes = inputStream.read(readBuffer);
}
for(i=0;i < numBytes ; i++){
tam = readBuffer[i];
char c=(char)tam;
if (c=='$'){
strResult = "$";
}else{
strResult = strResult+c;
} }
System.out.print(strResult);
} catch (IOException e) {System.out.println(e);}
break;
}}}

Thank you very much,

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

Most probably GPS has not got coordinates. It could take 20+ minutes for the first fix in some cases

/JaakL

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

Wow, that right? I heard that it needs several minutes for the GPS to coordinate. When I run my program, it take several seconds to get the output data. It may be the time to initial the COM port.
As your opinion I have to let the program run for about 20+? I will try. And hope that I will get the right result.
Thank in advance - smile

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

I have successfully gotten the GPS receiver run. It take about 30 minutes to coordinate. Now I have a new issue that I would like to consult you.
I want to build a Servlet (attached at the end if this message)that gets the longitude and latitude from the GPS receiver (COM3) and sends back to the MIDLet (as a request from the MIDlet). Every thing is OK but I don't know how to interrupt the serialEvent to finish the method call. Therefore the MIDLet cannot get the values from Servlet.
Thank you very much for your kind helps.

The code lines as follows (I put some pseudo codes at some places to make it shorter)

public class LoginServlet extends HttpServlet implements SerialPortEventListener {
InputStream in = null;
ByteArrayOutputStream bout = null;
static Enumeration portList;
static CommPortIdentifier portId;
SerialPort serialPort;
InputStream inputStream;
boolean gotSignal = false;
public String longitudeStr;
public String latitudeStr;

protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
//Read the request data
byte[] inData = null;
try {

}
//To get the logitute and latitude from GPS receiver at the Server
getGPSData();
System.out.println("PROBLEM IS THAT WE CAN NOT REACH THIS POSITION)");
//Send a new lon and lat back to the MIDlet
try {

} catch (Exception e) {
e.printStackTrace();
}
}

//Get the GPS data from receiver
protected void getGPSData(){
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals("COM3")) {
simpleRead();
}
}
}
}

public void simpleRead() {
portList = CommPortIdentifier.getPortIdentifiers();
while (portList.hasMoreElements()) {
portId = (CommPortIdentifier) portList.nextElement();
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
if (portId.getName().equals("COM3")) {
try {
serialPort = (SerialPort) portId.open("SimpleReadApp", 2000);
} catch (PortInUseException e) {System.out.println(e);}
try {
inputStream = serialPort.getInputStream();
} catch (IOException e) {System.out.println(e);}
try {
serialPort.addEventListener(this);
} catch (InterruptedException ex) {
Logger.getLogger(SimpleRead.class.getName()).log(Level.SEVERE, null, ex);
} catch (TooManyListenersException e) {System.out.println(e);}
serialPort.notifyOnDataAvailable(true);
try {
serialPort.setSerialPortParams(4800,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
} catch (UnsupportedCommOperationException e) {System.out.println(e);}
}
}
}
}

public void run() {
try {
Thread.sleep(20000);
} catch (InterruptedException e) {System.out.println(e);}
}

public void serialEvent(SerialPortEvent event) {
switch(event.getEventType()) {
case SerialPortEvent.BI:
case SerialPortEvent.OE:
case SerialPortEvent.FE:
case SerialPortEvent.PE:
case SerialPortEvent.CD:
case SerialPortEvent.CTS:
case SerialPortEvent.DSR:
case SerialPortEvent.RI:
case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
break;
case SerialPortEvent.DATA_AVAILABLE:
byte[] readBuffer = new byte[20];
try {
try {
//After initiating for geting the lon and lat, sleep 5 second before start reading again
if(gotSignal){
Thread.sleep(5000);
strResult = "";//Reset the result for a new signal
gotSignal = false;
}
} catch (InterruptedException ex) {
Logger.getLogger(SimpleRead.class.getName()).log(Level.SEVERE, null, ex);
}
while (inputStream.available() > 0) {
numBytes = inputStream.read(readBuffer);
}

if (longitudeStr.length()>0){
gotSignal = true;
}
}
} catch (IOException e) {System.out.println(e);}
}
}

}

Thank you,

mobilitier
User offline. Last seen 2 years 5 weeks ago. Offline
Joined: 12/03/2009

I have found a solution for the above issue. A separate thread is created when the Servlet load (by the doGet method). This thread is continually read the data from receiver (serial port) and put the longitude and latitude into a queue. Any time the MIDLet requests the Servlet for longitude and latitude values, the Servlet takes the newest values from the queue and sends them to the MIDLet.

Thank you very much
May I wish you a Merry Christmas and Happy New Year?

haifa
User offline. Last seen 1 year 43 weeks ago. Offline
Joined: 03/18/2010

Hi
I have a other problem with HelloMap : Emulator ExceptionEmulator Exception

Installing suite from: http://127.0.0.1:1658/hello_map.jad

****warning****
****Untrusted user classes must never be put
****on the system class path
****warning****

java.lang.NoClassDefFoundError: com/nutiteq/maps/CloudMade
- java.lang.Class.invoke_verify(), bci=0
- java.lang.Class.initialize(), bci=117
- java.lang.Class.forName(), bci=0
- com.sun.midp.main.CldcMIDletLoader.newInstance(), bci=1
- com.sun.midp.midlet.MIDletStateHandler.createMIDlet(), bci=66
- com.sun.midp.midlet.MIDletStateHandler.createAndRegisterMIDlet(), bci=17
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=27
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=52
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=8
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=161
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

Something is wrong with your built package. Maybe maps_lib jar is not included in the result build?

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

hai,

i have created a midlet class for hello map application.Though its running im not able to get the map tile,getting only the string "Hello Map" in the midlet..

also im getting the following error "Source not found the JAR of this class filebelongs to container 'J2ME library[Sun Java(TM)Wireless Toolkit 2.5.1 for CLDC/DefaultGrayPhone]'which does not allow modifications to source attachments on its entries." from MIDletState.class

can anybody suggest me a solution to get maptile??

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

How exactly do you get this error? We'd need to see your code, and possibly whole project to see what is wrong with it.

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

Hai thanks for your kind response.Following is my code,(map class file)

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

import com.nutiteq.MapItem;
import com.nutiteq.maps.*;
import com.nutiteq.components.WgsPoint;
import com.nutiteq.controls.ControlKeys;

public class map1 extends MIDlet implements CommandListener{
private Form form;
private MapItem mapitem;

public map1() {
mapitem = new MapItem("map1","bd686fd640be98efaae0091fa301e6134b952566d9d4d7.88620736",this,300,150,new WgsPoint(24.764580,59.437420),12);
form = new Form("Hello Map");
}

public void startApp(){
form.append(new StringItem(null,"Hello Map!"));
form.append(mapitem);
form.addCommand(new Command("Exit",Command.EXIT,0));
form.setCommandListener(this);
Display.getDisplay(this).setCurrent(form);
mapitem.startMapping();
}

public void pauseApp() {
// TODO Auto-generated method stub

}
public void destroyApp(boolean unconditional){
// TODO Auto-generated method stub

}
public void commandAction(Command c,Displayable d)
{
notifyDestroyed();
}

}

then after debug and running im getting the following console output,

Running with storage root temp.DefaultGrayPhone1
Running with locale: English_United States.1252
Running in the identified_third_party security domain

Class file editor follows,

Source not Found
the JAR of this class filebelongs to container 'J2ME library[Sun Java(TM)Wireless Toolkit 2.5.1 for CLDC/DefaultGrayPhone]'which does not allow modifications to source attachments on its entries

// Compiled from MIDletState.java (version 1.3 : 47.0, super bit)
public abstract class com.sun.midp.midlet.MIDletState {

// Field descriptor #68 I
static final int PAUSED = 0;

// Field descriptor #68 I
static final int ACTIVE = 1;

// Field descriptor #68 I
static final int PAUSED_RESUME = 2;

// Field descriptor #68 I
static final int ACTIVE_PENDING = 3;

// Field descriptor #68 I
static final int PAUSE_PENDING = 4;

// Field descriptor #68 I
static final int DESTROY_PENDING = 5;

// Field descriptor #68 I
static final int DESTROYED = 6;

// Field descriptor #84 Lcom/sun/midp/security/SecurityToken;
private static com.sun.midp.security.SecurityToken classSecurityToken;

// Field descriptor #86 Ljava/lang/Object;
private static java.lang.Object createMIDletLock;

// Field descriptor #88 Z
private static boolean allowedToCreateMIDlet;

// Field descriptor #68 I
private int skipPauseApp;

// Field descriptor #91 Ljava/lang/String;
private java.lang.String lastPlatformRequest;

// Field descriptor #68 I
private int state;

// Field descriptor #86 Ljava/lang/Object;
private final java.lang.Object mutex;

// Field descriptor #95 Lcom/sun/midp/midlet/Scheduler;
private com.sun.midp.midlet.Scheduler scheduler;

// Field descriptor #97 Ljavax/microedition/midlet/MIDlet;
protected javax.microedition.midlet.MIDlet midlet;

// Field descriptor #99 Ljavax/microedition/lcdui/Display;
protected javax.microedition.lcdui.Display display;

// Field descriptor #101 Lcom/sun/midp/lcdui/DisplayManager;
protected com.sun.midp.lcdui.DisplayManager displayManager;

// Field descriptor #91 Ljava/lang/String;
private static final java.lang.String MEDIA_TYPE = "media";

// Field descriptor #105 Lcom/sun/mmedia/MIDletPauseListener;
private static final com.sun.mmedia.MIDletPauseListener mediaListener;

// Field descriptor #107 Lcom/sun/midp/midlet/MIDletState$PauseTracker;
com.sun.midp.midlet.MIDletState$PauseTracker pauseTracker;

// Method descriptor #109 (Lcom/sun/midp/security/SecurityToken;)V
// Stack: 1, Locals: 1
public static void initSecurityToken(com.sun.midp.security.SecurityToken token);
0 getstatic com.sun.midp.midlet.MIDletState.classSecurityToken : com.sun.midp.security.SecurityToken [3]
3 ifnull 7
6 return
7 aload_0 [token]
8 putstatic com.sun.midp.midlet.MIDletState.classSecurityToken : com.sun.midp.security.SecurityToken [3]
11 return
Line numbers:
[pc: 0, line: 119]
[pc: 6, line: 120]
[pc: 7, line: 123]
[pc: 11, line: 124]
Local variable table:
[pc: 0, pc: 12] local: token index: 0 type: com.sun.midp.security.SecurityToken
Stack map : number of frames 1
[pc: 7, full, stack: {}, locals: {com.sun.midp.security.SecurityToken}]

// Method descriptor #115 (Ljava/lang/String;)Ljavax/microedition/midlet/MIDlet;
// Stack: 3, Locals: 7
static javax.microedition.midlet.MIDlet createMIDlet(java.lang.String classname) throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException;
0 getstatic com.sun.midp.midlet.MIDletState.createMIDletLock : java.lang.Object [4]
3 dup
4 astore_3
5 monitorenter
6 invokestatic com.sun.midp.midlet.Scheduler.getScheduler() : com.sun.midp.midlet.Scheduler [5]
9 invokevirtual com.sun.midp.midlet.Scheduler.getMIDletSuite() : com.sun.midp.midlet.MIDletSuite [6]
12 invokeinterface com.sun.midp.midlet.MIDletSuite.getStorageName() : java.lang.String [7] [nargs: 1]
17 aload_0 [classname]
18 invokestatic com.sun.midp.content.AppMonitor.midletInit(java.lang.String, java.lang.String) : void [8]
21 iconst_1
22 putstatic com.sun.midp.midlet.MIDletState.allowedToCreateMIDlet : boolean [9]
25 aload_0 [classname]
26 invokestatic java.lang.Class.forName(java.lang.String) : java.lang.Class [10]
29 astore_1 [midletClass]
30 aload_1 [midletClass]
31 invokevirtual java.lang.Class.newInstance() : java.lang.Object [11]
34 astore_2 [midlet]
35 aload_2 [midlet]
36 instanceof javax.microedition.midlet.MIDlet [12]
39 ifeq 57
42 aload_2 [midlet]
43 checkcast javax.microedition.midlet.MIDlet [12]
46 astore 4
48 iconst_0
49 putstatic com.sun.midp.midlet.MIDletState.allowedToCreateMIDlet : boolean [9]
52 aload_3
53 monitorexit
54 aload 4
56 areturn
57 new java.lang.InstantiationException [13]
60 dup
61 ldc [14]
63 invokespecial java.lang.InstantiationException(java.lang.String) [15]
66 athrow
67 astore 5
69 iconst_0
70 putstatic com.sun.midp.midlet.MIDletState.allowedToCreateMIDlet : boolean [9]
73 aload 5
75 athrow
76 astore 6
78 aload_3
79 monitorexit
80 aload 6
82 athrow
Exception Table:
[pc: 6, pc: 48] -> 67 when : any
[pc: 57, pc: 69] -> 67 when : any
[pc: 6, pc: 54] -> 76 when : any
[pc: 57, pc: 80] -> 76 when : any
Line numbers:
[pc: 0, line: 146]
[pc: 6, line: 150]
[pc: 21, line: 154]
[pc: 25, line: 156]
[pc: 30, line: 157]
[pc: 35, line: 158]
[pc: 42, line: 159]
[pc: 48, line: 164]
[pc: 52, line: 165]
[pc: 57, line: 162]
[pc: 67, line: 164]
[pc: 73, line: 165]
[pc: 76, line: 166]
Local variable table:
[pc: 0, pc: 83] local: classname index: 0 type: java.lang.String
[pc: 30, pc: 83] local: midletClass index: 1 type: java.lang.Class
[pc: 35, pc: 83] local: midlet index: 2 type: java.lang.Object
Stack map : number of frames 3
[pc: 57, full, stack: {}, locals: {java.lang.String, java.lang.Class, java.lang.Object, java.lang.Object}]
[pc: 67, full, stack: {java.lang.Throwable}, locals: {java.lang.String, _, _, java.lang.Object}]
[pc: 76, full, stack: {java.lang.Throwable}, locals: {java.lang.String, _, _, java.lang.Object}]

// Method descriptor #123 (Ljava/lang/String;Ljava/lang/String;)V
private static native void warnAboutPauseActivity0(java.lang.String arg0, java.lang.String arg1);

// Method descriptor #125 (Z)V
// Stack: 2, Locals: 2
void notifyMIDletPaused(boolean paused);
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.pauseTracker : com.sun.midp.midlet.MIDletState.PauseTracker [16]
4 iload_1 [paused]
5 invokevirtual com.sun.midp.midlet.MIDletState$PauseTracker.notifyMIDletPaused(boolean) : void [17]
8 return
Line numbers:
[pc: 0, line: 281]
[pc: 8, line: 282]
Local variable table:
[pc: 0, pc: 9] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 9] local: paused index: 1 type: boolean

// Method descriptor #130 (Ljavax/microedition/midlet/MIDlet;)V
// Stack: 4, Locals: 6
protected MIDletState(javax.microedition.midlet.MIDlet m);
0 aload_0 [this]
1 invokespecial java.lang.Object() [18]
4 aload_0 [this]
5 iconst_0
6 putfield com.sun.midp.midlet.MIDletState.skipPauseApp : int [19]
9 aload_0 [this]
10 new com.sun.midp.midlet.MIDletState$PauseTracker [20]
13 dup
14 aload_0 [this]
15 invokespecial com.sun.midp.midlet.MIDletState$PauseTracker(com.sun.midp.midlet.MIDletState) [21]
18 putfield com.sun.midp.midlet.MIDletState.pauseTracker : com.sun.midp.midlet.MIDletState.PauseTracker [16]
21 aload_0 [this]
22 aload_1 [m]
23 putfield com.sun.midp.midlet.MIDletState.midlet : javax.microedition.midlet.MIDlet [22]
26 aload_0 [this]
27 iconst_2
28 putfield com.sun.midp.midlet.MIDletState.state : int [23]
31 aload_0 [this]
32 invokestatic com.sun.midp.midlet.Scheduler.getScheduler() : com.sun.midp.midlet.Scheduler [5]
35 putfield com.sun.midp.midlet.MIDletState.scheduler : com.sun.midp.midlet.Scheduler [24]
38 aload_0 [this]
39 aload_0 [this]
40 getfield com.sun.midp.midlet.MIDletState.scheduler : com.sun.midp.midlet.Scheduler [24]
43 invokevirtual com.sun.midp.midlet.Scheduler.getMutex() : java.lang.Object [25]
46 putfield com.sun.midp.midlet.MIDletState.mutex : java.lang.Object [26]
49 getstatic com.sun.midp.midlet.MIDletState.createMIDletLock : java.lang.Object [4]
52 dup
53 astore_3
54 monitorenter
55 getstatic com.sun.midp.midlet.MIDletState.allowedToCreateMIDlet : boolean [9]
58 ifne 83
61 aload_0 [this]
62 getfield com.sun.midp.midlet.MIDletState.scheduler : com.sun.midp.midlet.Scheduler [24]
65 invokevirtual com.sun.midp.midlet.Scheduler.getMIDletSuite() : com.sun.midp.midlet.MIDletSuite [6]
68 astore 4 [suite]
70 aload 4 [suite]
72 ifnull 83
75 aload 4 [suite]
77 iconst_1
78 invokeinterface com.sun.midp.midlet.MIDletSuite.checkIfPermissionAllowed(int) : void [27] [nargs: 2]
83 aload_3
84 monitorexit
85 goto 95
88 astore 5
90 aload_3
91 monitorexit
92 aload 5
94 athrow
95 aload_0 [this]
96 invokestatic com.sun.midp.lcdui.DisplayManagerFactory.getDisplayManager() : com.sun.midp.lcdui.DisplayManager [28]
99 putfield com.sun.midp.midlet.MIDletState.displayManager : com.sun.midp.lcdui.DisplayManager [29]
102 aload_0 [this]
103 getfield com.sun.midp.midlet.MIDletState.displayManager : com.sun.midp.lcdui.DisplayManager [29]
106 getstatic com.sun.midp.midlet.MIDletState.classSecurityToken : com.sun.midp.security.SecurityToken [3]
109 aload_0 [this]
110 getfield com.sun.midp.midlet.MIDletState.midlet : javax.microedition.midlet.MIDlet [22]
113 invokeinterface com.sun.midp.lcdui.DisplayManager.createDisplay(com.sun.midp.security.SecurityToken, javax.microedition.midlet.MIDlet) : com.sun.midp.lcdui.DisplayAccess [30] [nargs: 3]
118 astore_2 [accessor]
119 aload_0 [this]
120 aload_2 [accessor]
121 invokeinterface com.sun.midp.lcdui.DisplayAccess.getDisplay() : javax.microedition.lcdui.Display [31] [nargs: 1]
126 putfield com.sun.midp.midlet.MIDletState.display : javax.microedition.lcdui.Display [32]
129 aload_0 [this]
130 getfield com.sun.midp.midlet.MIDletState.scheduler : com.sun.midp.midlet.Scheduler [24]
133 invokevirtual com.sun.midp.midlet.Scheduler.getMIDletSuite() : com.sun.midp.midlet.MIDletSuite [6]
136 invokeinterface com.sun.midp.midlet.MIDletSuite.isTrusted() : boolean [33] [nargs: 1]
141 ifeq 154
144 aload_2 [accessor]
145 getstatic com.sun.midp.midlet.MIDletState.classSecurityToken : com.sun.midp.security.SecurityToken [3]
148 iconst_1
149 invokeinterface com.sun.midp.lcdui.DisplayAccess.setTrustedIcon(com.sun.midp.security.SecurityToken, boolean) : void [34] [nargs: 3]
154 getstatic com.sun.midp.midlet.MIDletState.mediaListener : com.sun.mmedia.MIDletPauseListener [1]
157 invokestatic com.sun.mmedia.BasicPlayer.setMIDletPauseListener(com.sun.mmedia.MIDletPauseListener) : void [35]
160 return
Exception Table:
[pc: 55, pc: 85] -> 88 when : any
[pc: 88, pc: 92] -> 88 when : any
Line numbers:
[pc: 0, line: 297]
[pc: 4, line: 104]
[pc: 9, line: 273]
[pc: 21, line: 300]
[pc: 26, line: 301]
[pc: 31, line: 302]
[pc: 38, line: 303]
[pc: 49, line: 305]
[pc: 55, line: 306]
[pc: 61, line: 307]
[pc: 70, line: 309]
[pc: 75, line: 310]
[pc: 83, line: 313]
[pc: 95, line: 316]
[pc: 102, line: 317]
[pc: 119, line: 318]
[pc: 129, line: 320]
[pc: 144, line: 321]
[pc: 154, line: 324]
[pc: 160, line: 325]
Local variable table:
[pc: 70, pc: 83] local: suite index: 4 type: com.sun.midp.midlet.MIDletSuite
[pc: 0, pc: 161] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 161] local: m index: 1 type: javax.microedition.midlet.MIDlet
[pc: 119, pc: 161] local: accessor index: 2 type: com.sun.midp.lcdui.DisplayAccess
Stack map : number of frames 4
[pc: 83, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, javax.microedition.midlet.MIDlet, _, java.lang.Object}]
[pc: 88, full, stack: {java.lang.Throwable}, locals: {com.sun.midp.midlet.MIDletState, javax.microedition.midlet.MIDlet, _, java.lang.Object}]
[pc: 95, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, javax.microedition.midlet.MIDlet, _, java.lang.Object}]
[pc: 154, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, javax.microedition.midlet.MIDlet, com.sun.midp.lcdui.DisplayAccess, java.lang.Object}]

// Method descriptor #137 ()Ljavax/microedition/midlet/MIDlet;
// Stack: 1, Locals: 1
public javax.microedition.midlet.MIDlet getMIDlet();
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.midlet : javax.microedition.midlet.MIDlet [22]
4 areturn
Line numbers:
[pc: 0, line: 333]
Local variable table:
[pc: 0, pc: 5] local: this index: 0 type: com.sun.midp.midlet.MIDletState

// Method descriptor #139 ()Ljavax/microedition/lcdui/Display;
// Stack: 1, Locals: 1
public javax.microedition.lcdui.Display getDisplay();
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.display : javax.microedition.lcdui.Display [32]
4 areturn
Line numbers:
[pc: 0, line: 342]
Local variable table:
[pc: 0, pc: 5] local: this index: 0 type: com.sun.midp.midlet.MIDletState

// Method descriptor #141 ()V
protected abstract void startApp() throws javax.microedition.midlet.MIDletStateChangeException;

// Method descriptor #141 ()V
protected abstract void pauseApp();

// Method descriptor #125 (Z)V
protected abstract void destroyApp(boolean arg0) throws javax.microedition.midlet.MIDletStateChangeException;

// Method descriptor #141 ()V
// Stack: 2, Locals: 1
public final void notifyDestroyed();
0 aload_0 [this]
1 bipush 6
3 invokevirtual com.sun.midp.midlet.MIDletState.setState(int) : void [36]
6 return
Line numbers:
[pc: 0, line: 433]
[pc: 6, line: 434]
Local variable table:
[pc: 0, pc: 7] local: this index: 0 type: com.sun.midp.midlet.MIDletState

// Method descriptor #141 ()V
// Stack: 3, Locals: 3
public final void notifyPaused();
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.mutex : java.lang.Object [26]
4 dup
5 astore_1
6 monitorenter
7 aload_0 [this]
8 getfield com.sun.midp.midlet.MIDletState.state : int [23]
11 iconst_2
12 if_icmpeq 51
15 aload_0 [this]
16 getfield com.sun.midp.midlet.MIDletState.state : int [23]
19 iconst_5
20 if_icmpeq 51
23 aload_0 [this]
24 getfield com.sun.midp.midlet.MIDletState.state : int [23]
27 bipush 6
29 if_icmpeq 51
32 aload_0 [this]
33 dup
34 getfield com.sun.midp.midlet.MIDletState.skipPauseApp : int [19]
37 iconst_1
38 iadd
39 putfield com.sun.midp.midlet.MIDletState.skipPauseApp : int [19]
42 iconst_1
43 invokestatic com.sun.midp.midlet.MIDletState.notifyPaused0(boolean) : void [37]
46 aload_0 [this]
47 iconst_1
48 invokevirtual com.sun.midp.midlet.MIDletState.notifyMIDletPaused(boolean) : void [38]
51 aload_1
52 monitorexit
53 goto 61
56 astore_2
57 aload_1
58 monitorexit
59 aload_2
60 athrow
61 return
Exception Table:
[pc: 7, pc: 53] -> 56 when : any
[pc: 56, pc: 59] -> 56 when : any
Line numbers:
[pc: 0, line: 455]
[pc: 7, line: 460]
[pc: 32, line: 462]
[pc: 42, line: 463]
[pc: 46, line: 464]
[pc: 51, line: 466]
[pc: 61, line: 467]
Local variable table:
[pc: 0, pc: 62] local: this index: 0 type: com.sun.midp.midlet.MIDletState
Stack map : number of frames 3
[pc: 51, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, java.lang.Object}]
[pc: 56, full, stack: {java.lang.Throwable}, locals: {com.sun.midp.midlet.MIDletState, java.lang.Object}]
[pc: 61, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, java.lang.Object}]

// Method descriptor #125 (Z)V
private static native void notifyPaused0(boolean arg0);

// Method descriptor #141 ()V
// Stack: 1, Locals: 1
public final void notifyResumed();
0 iconst_0
1 invokestatic com.sun.midp.midlet.MIDletState.notifyPaused0(boolean) : void [37]
4 return
Line numbers:
[pc: 0, line: 473]
[pc: 4, line: 474]
Local variable table:
[pc: 0, pc: 5] local: this index: 0 type: com.sun.midp.midlet.MIDletState

// Method descriptor #150 ()Lcom/sun/midp/midlet/MIDletSuite;
// Stack: 1, Locals: 1
public final com.sun.midp.midlet.MIDletSuite getMIDletSuite();
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.scheduler : com.sun.midp.midlet.Scheduler [24]
4 invokevirtual com.sun.midp.midlet.Scheduler.getMIDletSuite() : com.sun.midp.midlet.MIDletSuite [6]
7 areturn
Line numbers:
[pc: 0, line: 484]
Local variable table:
[pc: 0, pc: 8] local: this index: 0 type: com.sun.midp.midlet.MIDletState

// Method descriptor #141 ()V
// Stack: 2, Locals: 1
public final void resumeRequest();
0 iconst_0
1 invokestatic com.sun.midp.midlet.MIDletState.notifyPaused0(boolean) : void [37]
4 aload_0 [this]
5 invokevirtual com.sun.midp.midlet.MIDletState.getState() : int [39]
8 iconst_1
9 if_icmpeq 33
12 aload_0 [this]
13 invokevirtual com.sun.midp.midlet.MIDletState.getState() : int [39]
16 iconst_2
17 if_icmpeq 33
20 aload_0 [this]
21 invokevirtual com.sun.midp.midlet.MIDletState.getState() : int [39]
24 iconst_3
25 if_icmpeq 33
28 aload_0 [this]
29 iconst_2
30 invokevirtual com.sun.midp.midlet.MIDletState.setState(int) : void [36]
33 return
Line numbers:
[pc: 0, line: 503]
[pc: 4, line: 505]
[pc: 28, line: 508]
[pc: 33, line: 510]
Local variable table:
[pc: 0, pc: 34] local: this index: 0 type: com.sun.midp.midlet.MIDletState
Stack map : number of frames 1
[pc: 33, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState}]

// Method descriptor #153 (Ljava/lang/String;)Z
public final native boolean platformRequest(java.lang.String arg0);

// Method descriptor #153 (Ljava/lang/String;)Z
// Stack: 2, Locals: 2
public boolean callPlatformRequest(java.lang.String URL) throws javax.microedition.io.ConnectionNotFoundException;
0 aload_1 [URL]
1 ifnull 13
4 aload_1 [URL]
5 ldc [40]
7 invokevirtual java.lang.String.startsWith(java.lang.String) : boolean [41]
10 ifeq 19
13 aload_0 [this]
14 aload_1 [URL]
15 invokevirtual com.sun.midp.midlet.MIDletState.platformRequest(java.lang.String) : boolean [42]
18 ireturn
19 aload_0 [this]
20 aload_1 [URL]
21 putfield com.sun.midp.midlet.MIDletState.lastPlatformRequest : java.lang.String [43]
24 aload_1 [URL]
25 invokevirtual java.lang.String.length() : int [44]
28 ifle 35
31 iconst_1
32 goto 36
35 iconst_0
36 ireturn
Line numbers:
[pc: 0, line: 587]
[pc: 13, line: 588]
[pc: 19, line: 590]
[pc: 24, line: 591]
Local variable table:
[pc: 0, pc: 37] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 37] local: URL index: 1 type: java.lang.String
Stack map : number of frames 4
[pc: 13, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, java.lang.String}]
[pc: 19, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, java.lang.String}]
[pc: 35, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, java.lang.String}]
[pc: 36, full, stack: {int}, locals: {com.sun.midp.midlet.MIDletState, java.lang.String}]

// Method descriptor #158 (Ljava/lang/String;)V
// Stack: 4, Locals: 3
private void executePlatformRequest(java.lang.String URL);
0 invokestatic com.sun.midp.content.CHInstallerInvoker.newInstance() : com.sun.midp.content.CHInstallerInvoker [45]
3 astore_2 [loader]
4 aload_2 [loader]
5 aload_0 [this]
6 getfield com.sun.midp.midlet.MIDletState.midlet : javax.microedition.midlet.MIDlet [22]
9 invokevirtual java.lang.Object.getClass() : java.lang.Class [46]
12 invokevirtual java.lang.Class.getName() : java.lang.String [47]
15 getstatic com.sun.midp.midlet.MIDletState.classSecurityToken : com.sun.midp.security.SecurityToken [3]
18 invokevirtual com.sun.midp.content.CHInstallerInvoker.prepareRegistry(java.lang.String, com.sun.midp.security.SecurityToken) : void [48]
21 aload_2 [loader]
22 aload_1 [URL]
23 aload_0 [this]
24 getstatic com.sun.midp.midlet.MIDletState.classSecurityToken : com.sun.midp.security.SecurityToken [3]
27 invokevirtual com.sun.midp.content.CHInstallerInvoker.invoke(java.lang.String, com.sun.midp.midlet.MIDletState, com.sun.midp.security.SecurityToken) : boolean [49]
30 pop
31 return
Line numbers:
[pc: 0, line: 596]
[pc: 4, line: 598]
[pc: 21, line: 600]
[pc: 31, line: 601]
Local variable table:
[pc: 0, pc: 32] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 32] local: URL index: 1 type: java.lang.String
[pc: 4, pc: 32] local: loader index: 2 type: com.sun.midp.content.CHInstallerInvoker

// Method descriptor #162 (I)V
// Stack: 2, Locals: 4
void setState(int newState);
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.mutex : java.lang.Object [26]
4 dup
5 astore_2
6 monitorenter
7 aload_0 [this]
8 iload_1 [newState]
9 invokevirtual com.sun.midp.midlet.MIDletState.setStateWithoutNotify(int) : void [50]
12 aload_0 [this]
13 getfield com.sun.midp.midlet.MIDletState.mutex : java.lang.Object [26]
16 invokevirtual java.lang.Object.notifyAll() : void [51]
19 aload_2
20 monitorexit
21 goto 29
24 astore_3
25 aload_2
26 monitorexit
27 aload_3
28 athrow
29 return
Exception Table:
[pc: 7, pc: 21] -> 24 when : any
[pc: 24, pc: 27] -> 24 when : any
Line numbers:
[pc: 0, line: 612]
[pc: 7, line: 613]
[pc: 12, line: 614]
[pc: 19, line: 615]
[pc: 29, line: 616]
Local variable table:
[pc: 0, pc: 30] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 30] local: newState index: 1 type: int
Stack map : number of frames 2
[pc: 24, full, stack: {java.lang.Throwable}, locals: {com.sun.midp.midlet.MIDletState, int, java.lang.Object}]
[pc: 29, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int, java.lang.Object}]

// Method descriptor #165 (Ljava/lang/String;)I
// Stack: 2, Locals: 2
public int checkPermission(java.lang.String permission);
0 aload_0 [this]
1 invokevirtual com.sun.midp.midlet.MIDletState.getMIDletSuite() : com.sun.midp.midlet.MIDletSuite [52]
4 aload_1 [permission]
5 invokeinterface com.sun.midp.midlet.MIDletSuite.checkPermission(java.lang.String) : int [53] [nargs: 2]
10 ireturn
Line numbers:
[pc: 0, line: 630]
Local variable table:
[pc: 0, pc: 11] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 11] local: permission index: 1 type: java.lang.String

// Method descriptor #162 (I)V
// Stack: 3, Locals: 2
void setStateWithoutNotify(int newState);
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.skipPauseApp : int [19]
4 ifle 24
7 iload_1 [newState]
8 iconst_4
9 if_icmpne 24
12 iconst_0
13 istore_1 [newState]
14 aload_0 [this]
15 dup
16 getfield com.sun.midp.midlet.MIDletState.skipPauseApp : int [19]
19 iconst_1
20 isub
21 putfield com.sun.midp.midlet.MIDletState.skipPauseApp : int [19]
24 aload_0 [this]
25 getfield com.sun.midp.midlet.MIDletState.state : int [23]
28 tableswitch default: 97
case 0: 80
case 1: 86
case 2: 97
case 3: 97
case 4: 97
case 5: 73
case 6: 72
72 return
73 iload_1 [newState]
74 bipush 6
76 if_icmpeq 97
79 return
80 iload_1 [newState]
81 iconst_4
82 if_icmpne 97
85 return
86 iload_1 [newState]
87 iconst_2
88 if_icmpeq 96
91 iload_1 [newState]
92 iconst_3
93 if_icmpne 97
96 return
97 iload_1 [newState]
98 bipush 6
100 if_icmpne 132
103 aload_0 [this]
104 getfield com.sun.midp.midlet.MIDletState.lastPlatformRequest : java.lang.String [43]
107 ifnull 128
110 aload_0 [this]
111 getfield com.sun.midp.midlet.MIDletState.lastPlatformRequest : java.lang.String [43]
114 invokevirtual java.lang.String.length() : int [44]
117 ifle 128
120 aload_0 [this]
121 aload_0 [this]
122 getfield com.sun.midp.midlet.MIDletState.lastPlatformRequest : java.lang.String [43]
125 invokespecial com.sun.midp.midlet.MIDletState.executePlatformRequest(java.lang.String) : void [54]
128 aload_0 [this]
129 invokevirtual com.sun.midp.midlet.MIDletState.notifyResumed() : void [55]
132 aload_0 [this]
133 iload_1 [newState]
134 putfield com.sun.midp.midlet.MIDletState.state : int [23]
137 aload_0 [this]
138 getfield com.sun.midp.midlet.MIDletState.state : int [23]
141 iconst_1
142 if_icmpne 150
145 aload_0 [this]
146 iconst_0
147 invokevirtual com.sun.midp.midlet.MIDletState.notifyMIDletPaused(boolean) : void [38]
150 return
Line numbers:
[pc: 0, line: 643]
[pc: 12, line: 644]
[pc: 14, line: 645]
[pc: 24, line: 648]
[pc: 72, line: 651]
[pc: 73, line: 654]
[pc: 79, line: 656]
[pc: 80, line: 662]
[pc: 85, line: 664]
[pc: 86, line: 669]
[pc: 96, line: 671]
[pc: 97, line: 675]
[pc: 103, line: 676]
[pc: 120, line: 679]
[pc: 128, line: 685]
[pc: 132, line: 688]
[pc: 137, line: 690]
[pc: 145, line: 691]
[pc: 150, line: 693]
Local variable table:
[pc: 0, pc: 151] local: this index: 0 type: com.sun.midp.midlet.MIDletState
[pc: 0, pc: 151] local: newState index: 1 type: int
Stack map : number of frames 10
[pc: 24, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 72, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 73, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 80, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 86, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 96, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 97, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 128, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 132, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]
[pc: 150, full, stack: {}, locals: {com.sun.midp.midlet.MIDletState, int}]

// Method descriptor #169 ()I
// Stack: 2, Locals: 3
int getState();
0 aload_0 [this]
1 getfield com.sun.midp.midlet.MIDletState.mutex : java.lang.Object [26]
4 dup
5 astore_1
6 monitorenter
7 aload_0 [this]
8 getfield com.sun.midp.midlet.MIDletState.state : int [23]
11 aload_1
12 monitorexit
13 ireturn
14 astore_2
15 aload_1
16 monitorexit
17 aload_2
18 athrow
Exception Table:
[pc: 7, pc: 13] -> 14 when : any
[pc: 14, pc: 17] -> 14 when : any
Line numbers:
[pc: 0, line: 701]
[pc: 7, line: 702]
[pc: 14, line: 703]
Local variable table:
[pc: 0, pc: 19] local: this index: 0 type: com.sun.midp.midlet.MIDletState
Stack map : number of frames 1
[pc: 14, full, stack: {java.lang.Throwable}, locals: {com.sun.midp.midlet.MIDletState, java.lang.Object}]

// Method descriptor #123 (Ljava/lang/String;Ljava/lang/String;)V
// Stack: 2, Locals: 2
static synthetic void access$000(java.lang.String x0, java.lang.String x1);
0 aload_0 [x0]
1 aload_1 [x1]
2 invokestatic com.sun.midp.midlet.MIDletState.warnAboutPauseActivity0(java.lang.String, java.lang.String) : void [2]
5 return
Line numbers:
[pc: 0, line: 44]
Local variable table:
[pc: 0, pc: 6] local: x0 index: 0 type: java.lang.String
[pc: 0, pc: 6] local: x1 index: 1 type: java.lang.String

// Method descriptor #175 ()Lcom/sun/mmedia/MIDletPauseListener;
// Stack: 1, Locals: 0
static synthetic com.sun.mmedia.MIDletPauseListener access$200();
0 getstatic com.sun.midp.midlet.MIDletState.mediaListener : com.sun.mmedia.MIDletPauseListener [1]
3 areturn
Line numbers:
[pc: 0, line: 44]

// Method descriptor #141 ()V
// Stack: 3, Locals: 0
static {};
0 new java.lang.Object [56]
3 dup
4 invokespecial java.lang.Object() [18]
7 putstatic com.sun.midp.midlet.MIDletState.createMIDletLock : java.lang.Object [4]
10 new com.sun.midp.midlet.MIDletState$MediaListener [57]
13 dup
14 aconst_null
15 invokespecial com.sun.midp.midlet.MIDletState$MediaListener(com.sun.midp.midlet.MIDletState$1) [58]
18 putstatic com.sun.midp.midlet.MIDletState.mediaListener : com.sun.mmedia.MIDletPauseListener [1]
21 return
Line numbers:
[pc: 0, line: 93]
[pc: 10, line: 242]

Inner classes:
[inner class info: #60 com/sun/midp/midlet/MIDletState$1, outer class info: #59 com/sun/midp/midlet/MIDletState
inner name: #0, accessflags: 8 static],
[inner class info: #20 com/sun/midp/midlet/MIDletState$PauseTracker, outer class info: #59 com/sun/midp/midlet/MIDletState
inner name: #63 PauseTracker, accessflags: 0 default],
[inner class info: #57 com/sun/midp/midlet/MIDletState$MediaListener, outer class info: #59 com/sun/midp/midlet/MIDletState
inner name: #64 MediaListener, accessflags: 10 private static],
[inner class info: #65 com/sun/midp/midlet/MIDletState$MIDletPauseListener, outer class info: #59 com/sun/midp/midlet/MIDletState
inner name: #66 MIDletPauseListener, accessflags: 1545 public abstract static]
}

debugging informations are,

map1 [Wireless Toolkit Emulator]
cmd (4/8/10 10:41 PM)
map1 [Wireless Toolkit Emulator]
DefaultGrayPhone at localhost 3278
System Thread [KVM_main] (Class load: map1)
MIDletState.createMIDlet(String) line: 156
Scheduler.schedule(MIDletSuite) line: 301
Main.runLocalClass(CommandState) line: 466
Main.main(String[]) line: 121
cmd (4/8/10 10:58 PM)
map1 [Wireless Toolkit Emulator]
cmd (4/8/10 10:58 PM)

tell me where is problem and how to rectify??

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

The code is fine, and it works fine in my environment: WTK 2.5.2, Eclipse, Mobile Tools for Java. Something seems to be wrong with your development tools (Java, WTK and/or IDE) , or project build files (workspace), or computer. First of all try to recreate new project with same code and run there.

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

fine.i will try it once again.my WTK version is 2.5.1 for CLDC

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

i tried with the same code once again in a new project.but still its not running.this time im getting the following console output,

Running with storage root MediaControlSkin
Running with locale: English_United States.1252
Running in the identified_third_party security domain
java.lang.NoClassDefFoundError: com/nutiteq/MapItem
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+80)
Execution completed.
3393878 bytecodes executed
18 thread switches
1669 classes in the system (including system classes)
17678 dynamic objects allocated (528536 bytes)
2 garbage collections (456948 bytes collected)

reply me as soon as possible..

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

Most probably SDK library is not exported to application JAR file. It is so, if your application JAR is much smaller than 50 KB. In Eclipse you should check Build Path, last tab (Order and Export), and check if maps_lib is checked there. At least Eclipse does not export libraries by default, but for J2ME you need this.

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

before i didnt check that library file in order and export option.But now i checked it and running,im getting the string "Hello map" but still not the map tile..help me out to get the tile..

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

Usually there is midlet networking issue in this case. WTK network monitor could give more info what is wrong with this. Maybe proxy is needed?

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

oh..how do i add proxy and resolve this issue to get the tile??

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

Someone else has suggested following : http://www.nutiteq.com/content/errors-tutorial-mapslib0100#comment-146

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

hai jaak thanks for the details provided.thing is that i already knew the procedure to configure the proxy server with the WTK..

but i have no idea about how to have and configure the proxy server in my system first of all.then only i can config with WTK know??

pls provide me the complete details about how i can have proxy server..

and one more thing there is no anti virus currently working in my system.is because of this im not able to get map tile??

provide me the required details pls..

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

You do not have to set up new proxy server. If your computer requires proxy configuration (and it is configured in web browser, for example), then it should be configured same way also in WTK. Then all HTTP connections of an J2ME app should go over the proxy. The mobile app does not know anything about proxy.

You may also have some other networking issue. From current info it is impossible to tell. If you open network monitor of WTK then you should see HTTP requests and responses. What do you see there?

/JaakL

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

Hai jaak, if i open network config of WTK nothing im getting here.blank detail is there in the place http and port..

sudharam
User offline. Last seen 1 year 37 weeks ago. Offline
Joined: 03/08/2010

jaak can you provide me the solution as soon as possible..what should i do further??waiting for your reply..

jaak
User offline. Last seen 13 hours 14 min ago. Offline
Joined: 06/19/2008

I'm sorry, this is WTK networking configuration issue, which is specific to your local network set-up. It has nothing to do with our software and we can't help much here

/JaakL