java - How can I use project resources in my code? -
say working on project involves using resources imported project in eclipse.
in src
folder, have res
folder, contains kinds of resources: image files, wav files.
now need access these files in code. should trivial i'm not sure how this.
what should do? somehow store resource in file
object? use kind of stream?
what best way this? common 'conventional' and/or simplest way know use resources in code.
i use packages import functionality managing media resources
javax.media.format; javax.media.manager; javax.media.medialocator; javax.media.player; javax.media.pluginmanager; javax.media.format.audioformat
;
player player = manager.createplayer(new medialocator(newfile("/res/file.wav").touri().tourl()));
Comments
Post a Comment