Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor abhi4u's Avatar
    Join Date
    Feb 2009
    Posts
    52
    Hello All,

    I have written an application in j2me. When i am running this application i am getting some error. This error is:

    (Here SnapperWithGUI is my package name and NewSnapper is my class name)

    java.io.IOException
    at javax.microedition.lcdui.ImmutableImage.getImageFromStream(+15)
    at javax.microedition.lcdui.ImmutableImage.<init>(+20)
    at javax.microedition.lcdui.Image.createImage(+8)
    at SnapperWithGUI.NewSnapper.createCommands(+7)
    at SnapperWithGUI.NewSnapper.startApp(+24)
    at javax.microedition.midlet.MIDletProxy.startApp(+7)
    at com.sun.midp.midlet.Scheduler.schedule(+270)
    at com.sun.midp.main.Main.runLocalClass(+28)
    at com.sun.midp.main.Main.main(+80)
    java.lang.NullPointerException
    java.lang.NullPointerException
    at javax.microedition.lcdui.Form.append(+11)
    at SnapperWithGUI.NewSnapper.createLoginForm(+11)
    at SnapperWithGUI.NewSnapper.createScreens(+25)
    at SnapperWithGUI.NewSnapper.startApp(+28)
    at javax.microedition.midlet.MIDletProxy.startApp(+7)
    at com.sun.midp.midlet.Scheduler.schedule(+270)
    at com.sun.midp.main.Main.runLocalClass(+28)
    at com.sun.midp.main.Main.main(+80)

    If anyone know about this error then please let me know that what is problem and what is the solution for this problem??

    Thanks With Regards
    abhi4u

  2. #2
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    You are calling:

    Code:
    Image img = Image.createImage("/someimage.png");
    There are two possibilities:

    1. the image file is not in the JAR

    2. the image is too large to load

    Check in your JAR file, and make sure the image file actually exists. File names in JARs are case-sensitive (like Unix file names), so make sure they match exactly. Check you have a leading "/" in front of the file name in the Java code.

    Cheers,
    Graham.

  3. #3
    Regular Contributor senthil_k's Avatar
    Join Date
    Sep 2007
    Location
    Thirunelveli
    Posts
    115
    Hi abhi,
    Image object is not created. some poroblem in getting image streams. to know this issue correct try to create an image from the res folder of the application like this im = Image.createImage("/image_bw.png");. check if this error comes. if not then it is from getting image streams

    Regards,
    Senthil

Similar Threads

  1. Porting BlackBerry: Carbide & J2ME Comparison.
    By skynetchris in forum Symbian C++
    Replies: 0
    Last Post: 2008-05-22, 07:09
  2. J2me MIDlet to Servlet HttpPost connection Exception java.io.EOFException
    By sumanbera in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2008-01-11, 12:29
  3. Can J2ME be used for sending MMS Message ?
    By seno_ap in forum Mobile Java General
    Replies: 1
    Last Post: 2006-11-24, 14:36
  4. need urgent guidance on j2me
    By cogni_niru in forum Mobile Java General
    Replies: 1
    Last Post: 2005-11-13, 15:02
  5. Replies: 4
    Last Post: 2004-02-10, 01:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved