×

Discussion Board

Results 1 to 9 of 9

Thread: LWUIT

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    24

    LWUIT

    can any body tell me what do you mean by this error in LWUIT regarding image



    java.io.IOException
    at javax.microedition.lcdui.Image.createImage(Image.java:323)
    at com.sun.lwuit.impl.midp.GameCanvasImplementation.createImage(Unknown Source)
    at com.sun.lwuit.Image.createImage(Unknown Source)
    at ImageMidlet.startApp(Unknown Source)
    at javax.microedition.midlet.MIDletInvoker.invokeStartApp(MIDletInvoker.java:30)
    at com.symbian.j2me.midp.runtimeV2.Application.startAction(Application.java:526)
    at com.symbian.j2me.midp.runtimeV2.Application.startRequest(Application.java:453)
    at com.symbian.j2me.midp.runtimeV2.Application.event(Application.java:304)
    at com.symbian.j2me.midp.runtimeV2.ApplicationEvent.dispatch(ApplicationEvent.java:90)
    at com.symbian.j2me.midp.runtimeV2.ApplicationThread.run(ApplicationThread.java:30)

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

    Re: LWUIT

    You are loading the image but the image's name probably missing or misspelled.Please check
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    24

    Re: LWUIT

    please can u tell me ..i am working on netbeans so where should i kept image to access it ....please provide one example....


    the path which i am mentioning is not correct i need path.....

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

    Re: LWUIT

    Quote Originally Posted by ramcsdp07 View Post
    please can u tell me ..i am working on netbeans so where should i kept image to access it ....please provide one example....


    the path which i am mentioning is not correct i need path.....
    You have to make the folder called as the "res" or the name that you wanna give inside your current working directory -> Inside Your Project and parallel to the src folder.Then put the all resources out here whether this is the file of any kind.
    Then right click the project -> Properties -> Libraries and Resources -> add folder.

    Give the path of the folder that you created.Press Ok and ok...try to run the project, hopefully this should run.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    24

    Re: LWUIT

    the folder name is ImageFolder and image name is Image so the path name is like this

    Image i=createImage("/ImageFolder/image.png");

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    24

    Re: LWUIT

    Please can you provide a sample code....

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

    Re: LWUIT

    Quote Originally Posted by ramcsdp07 View Post
    the folder name is ImageFolder and image name is Image so the path name is like this

    Image i=createImage("/ImageFolder/image.png");
    Is this folder is parallel to the src folder?

    if yes then add this fodler as I told in my last post.Then try to create the Image like this,
    Image i=createImage("/image.png");
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  8. #8
    Registered User
    Join Date
    May 2010
    Posts
    24

    Re: LWUIT

    raj please can u give a sample code....

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

    Re: LWUIT

    Quote Originally Posted by ramcsdp07 View Post
    raj please can u give a sample code....
    For this there is no code required and this can be done using the manual procedure.In order to add the image to the jar file and then read the images from the jar file using the code.The issue with you is to add the resources to the project so that all the resources can be available.SO kindly do follow the same procedure that I shared with you.

    For instance you would like to use specific resources for Project. Create following directory structure:

    res in the project. and then add

    Put resource files in folder, i. e.
    \res\logo.png

    Then open project customizer (right click on the Project > Properties) and add the directory with resources in Libraries & Resources (Add Folder). All content of the folder gets added into the JAR file. You may use different folders in different configurations.

    Then reference the resources:
    Image i=createImage("/logo.png");
    This is what all you need to do.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Replies: 0
    Last Post: 2010-04-20, 12:25
  2. LCDUI Alert on an LWUIT Form
    By slugger_2003 in forum Mobile Java General
    Replies: 0
    Last Post: 2010-04-18, 13:01
  3. Replies: 3
    Last Post: 2010-04-10, 19:10
  4. Jar size caused by Kxml and LWUIT
    By bumble-bee in forum Mobile Java General
    Replies: 6
    Last Post: 2009-11-21, 10:09
  5. lwuit and j2me
    By Arunesh in forum Mobile Java General
    Replies: 16
    Last Post: 2009-09-12, 15: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
  •  
×