×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    17

    Smile How can i compile a MIDlet with some images?

    Hello,
    I work with JAVA ME Platform SDK 3.0 and I use in my MIDlet some images .png.
    When I run the MIDlet in the emulator, all works fine!
    But when I run the MIDlet in my nokia (.jar file and .jad file) have an error:
    java.io.IOEXception: Cannot read img/nameimage.png.

    All the images stay in a package named img in the same folder of the source (src).
    How can I do?!!??!?!?!
    Please help me! Thks

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: How can i compile a MIDlet with some images?

    Quote Originally Posted by stiec View Post
    Hello,
    But when I run the MIDlet in my nokia (.jar file and .jad file) have an error:
    java.io.IOEXception: Cannot read img/nameimage.png.

    All the images stay in a package named img in the same folder of the source (src).
    How can I do?!!??!?!?!
    Please help me! Thks
    Hi,
    On which IDE you are working?
    Well,this exception is thrown when your device is not able to read the name of the image/resource correctly,though the same is available.I would suggest you that please check the name of the images you are loading.

    One more thing is that please put the images and other resources in the folder called as "res" in the netbeans IDE you can give the any name to the folder.In eclipse the name is by default is "res".

    Then using the netbeans you can right click the project and then click "library and resources" and then add the folder.
    I am sure that you can fix this issue.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. MIDlet using socket to talk with c++ app
    By Lord Ryj in forum Mobile Java General
    Replies: 2
    Last Post: 2009-05-14, 15:47
  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. 技术文档:MIDP 2.0安全机制 与 MIDlet 数字签名
    By wotrust in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-12-30, 07:42
  4. Adding new images to the midlet
    By morash in forum Mobile Java General
    Replies: 3
    Last Post: 2003-07-20, 14:01
  5. Java MIDlet will not compile
    By frank_buettner in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2002-11-27, 08:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •