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

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

collision detection - C++ library for mesh to mesh intersection: what is available? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -