i want to retrieve a image from an URL,but when i compile all codes in DOJA emulator and to run it,a error eccurred:
Exception: java/lang/NullPointerException
com/nttdocomo/io/reference/http/URLParser.parseProtocol (virtual) IP = 9
com/nttdocomo/io/reference/http/URLParser.<init> (virtual) IP = 28
com/nttdocomo/io/reference/http/URLParser.<init> (virtual) IP = 6
com/nttdocomo/io/reference/http/Protocol.checkForMatchingSourceURL (virtual) IP = 43
com/nttdocomo/io/reference/http/Protocol.checkURLRestrictions (virtual) IP = 12
com/nttdocomo/io/reference/http/Protocol.open (virtual) IP = 84
com/sun/cldc/io/ConnectionBase.openPrim (virtual) IP = 7
javax/microedition/io/Connector.openPrim (static) IP = 135
javax/microedition/io/Connector.open (static) IP = 15
javax/microedition/io/Connector.open (static) IP = 6
com/nttdocomo/ui/MediaConnection.fetchMedia (virtual) IP = 8
com/nttdocomo/ui/MediaManager.getImage (static) IP = 14
ConnePanel.<init> (virtual) IP = 21
ConnectionTest.start (virtual) IP = 7
com/nttdocomo/dojaemu/Launcher.main (static) IP = 55
Exception: java/lang/SecurityException
com/nttdocomo/io/reference/http/Protocol.checkForMatchingSourceURL (virtual) IP = 105
com/nttdocomo/io/reference/http/Protocol.checkURLRestrictions (virtual) IP = 12
com/nttdocomo/io/reference/http/Protocol.open (virtual) IP = 84
com/sun/cldc/io/ConnectionBase.openPrim (virtual) IP = 7
javax/microedition/io/Connector.openPrim (static) IP = 135
javax/microedition/io/Connector.open (static) IP = 15
javax/microedition/io/Connector.open (static) IP = 6
com/nttdocomo/ui/MediaConnection.fetchMedia (virtual) IP = 8
com/nttdocomo/ui/MediaManager.getImage (static) IP = 14
ConnePanel.<init> (virtual) IP = 21
ConnectionTest.start (virtual) IP = 7
com/nttdocomo/dojaemu/Launcher.main (static) IP = 55
Exception: java/lang/SecurityException
com/nttdocomo/dojaemu/Launcher.main (static) IP = 183
Uncaught excpetion: java/lang/SecurityException
Method............: 45122c 'com/nttdocomo/dojaemu/Launcher.main (static)
.........
the code as bellow:
import com.nttdocomo.ui.*;
import com.nttdocomo.io.*;
public class ConnectionTest extends IApplication{
public void start(){
ConnePanel pl = new ConnePanel();
Display.setCurrent(pl);
PhoneSystem.setAttribute(PhoneSystem.DEV_BACKLIGHT,PhoneSystem.ATTR_BACKLIGHT_ON);
}
}
class ConnePanel extends Panel{
VisualPresenter vp1;
MediaImage mi1;
ConnePanel(){
vp1 = new VisualPresenter();
try{
mi1 = MediaManager.getImage("http://www.google.com/images/hp0.gif");
mi1.use();
}catch(ConnectionException ce){}
vp1.setImage(mi1);
this.add(vp1);
vp1.play();
}
}
-------------------
i use this sdk for DOJA:
ava(tm) 2 Platform, Micro Edition, Wireless SDK for the DoJa APIs (Release 2.2)
can you help me?
bluebird yan
Received on Fri Sep 13 05:39:28 2002