file - Java handling Resources in a Jar AND in the eclipse project -
im confused after reading many different information problem. im writing java game. of course have resources pictures sounds , on. need way, files in jar - when exported project - runs eclipse project. how scanning folder until now:
f = new file(this.getclass().getresource("../" + soundarchive).tostring().substring(5)).listfiles();
this confusing, unproffessional, , seems dont work in jar...
inputstream = getclass().getclassloader().getresourceasstream("bgmusic.wav");
..is returning null in eclipse project...
so best way this?
thank you.
Comments
Post a Comment