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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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