png file , txt file

Login to reply to this topic.
Sun, 2005-08-07 19:49
Joined: 2004-08-24
Forum posts: 127
Hi
please advise :
1) for some reason the png icon file is not included is the jar file - any idea why ? (I have this line in the jad and manifest files : "MIDlet-1: MyApp, /icons/myapp.png, myapp.MyAppMIDlet")

2) I want to read a text file using this line :
InputStream is = getClass().getResourceAsStream("file.txt");
where should I put the txt file , and how do I make the application know where the file is ?

Thanks you very much

Sat, 2005-08-27 16:32
Joined: 2005-05-16
Forum posts: 25
Re: png file , txt file
Hi!

i dont know the answer for the first question
for the second:
put the file in the ressources folder (res when you use wtk from sun)

hope this helps
greets Facetious
Mon, 2005-08-29 10:15
Joined: 2005-08-29
Forum posts: 30
Re: png file , txt file
hi!
for the first answer you should store icon in the res folder in the application folder, and with the help of emulator in the setting option and select the MIDPlet then go to the perticuler menu i which you want to set the icon, with the help of edit set the icon path '/icon.png' then save setting.
And second answer you should store txt file in the res folder, then read it with '/file.txt' path.
by kk
have a nice day!!
Wed, 2005-09-14 09:18
Joined: 2005-03-30
Forum posts: 13
Re: png file , txt file
For first question:
Include the resource folder in which you are placing the icon file in path. If you are using NetBeans this can be done
by adding folder in Properties/Libraries and Resources
Hope this helps.
Vijay
  • Login to reply to this topic.