×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    96

    Image not displayed when jar file is created

    Hi,

    In my application ,im displaying the image in the first screen.I have stored the image in the res folder of the application.When i'm testing it in the emulator it works fine.

    but when i create package to get jad and jar files,and click on jad file , then the image is not getting displayed there.

    can anyone tell me what is the problem.

  2. #2
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Image not displayed when jar file is created

    which IDE you are using??????
    are you trying to run the jad by double clicking it and making WTK emulator to run the app
    Regards,
    Saurabh

  3. #3
    Regular Contributor
    Join Date
    May 2009
    Posts
    96

    Re: Image not displayed when jar file is created

    Quote Originally Posted by ingsaurabh View Post
    which IDE you are using??????
    are you trying to run the jad by double clicking it and making WTK emulator to run the app
    Im not using IDE in this,
    I'm using text editor and using Sun wireless toolkit.
    Yes i tried jar and jad files and double clicked on jad file to check once whether its working fine.

  4. #4
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: Image not displayed when jar file is created

    have you tested you app. in real device
    Regards,
    Saurabh

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    43

    Re: Image not displayed when jar file is created

    Try adding or stripping the slash character (/) before your image name

    Image.createImage("/logo.png");
    Image.createImage("logo.png");

    My apps work with slash: Image.createImage("/images/logo.png"); and my images are stored in /res/images/logo.png directory. Of course you have to add your resources folder to the project too

    best,
    Damjan

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: Image not displayed when jar file is created

    Check upper/lower case letters in your your midlet used to call the png image and it path, Windows is not case sensitive so it fetchs the iange file in any combination of upper/lower case letters in the file name, but after packed in JAR it becomes case senstive.

    thanks,
    ~Amitabh

  7. #7
    Regular Contributor
    Join Date
    May 2009
    Posts
    96

    Re: Image not displayed when jar file is created

    Quote Originally Posted by im2amit View Post
    Check upper/lower case letters in your your midlet used to call the png image and it path, Windows is not case sensitive so it fetchs the iange file in any combination of upper/lower case letters in the file name, but after packed in JAR it becomes case senstive.

    thanks,
    ~Amitabh
    Hi,

    Thanks for your reply.

    Actually it was a case sensitive problem. My image was stored as image.PNG and in code i was giving image.png.

  8. #8
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,085

    Re: Image not displayed when jar file is created

    Good you found it early, I faced this problem few years back and could find it only when my app failed on a demo on the real device. This comes because if you save any file in Windows and allow it to add the extension on it own, it always adds it in upper case.

    thanks,
    ~Amitabh
    Visit My Website

Similar Threads

  1. Replies: 1
    Last Post: 2008-07-11, 02:32
  2. Error : Cannot find file : for DUMMIES
    By PACALA_BA in forum Symbian
    Replies: 7
    Last Post: 2008-07-06, 13:18
  3. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  4. Replies: 1
    Last Post: 2005-05-26, 14:22
  5. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

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