java - Imported package edition - Ressource null pointer exception -


i have imported sources previous work in actual application, algorithma working fine still running correctly did before, when tried change ressources such specific image or sound using other file in variable declaration, null pointer exception showed up. made sure new files correctly placed in usual ressource file old application. tried else, instance i've took random file desktop , renamed file used in old program resource file. i've swaped 2 files. (same type of course) same error showed itself, quite normal because it's related pointer.

do have clue on how use new ressources on imported package source, or how make see new ressource files ?

here message :

exception in thread "main" java.lang.nullpointerexception     @ com.sun.media.sound.standardmidifilereader.getsequence(standardmidifilereader.java:205)     @ javax.sound.midi.midisystem.getsequence(midisystem.java:836)     @ com.sun.media.sound.softmidiaudiofilereader.getaudioinputstream(softmidiaudiofilereader.java:174)     @ javax.sound.sampled.audiosystem.getaudioinputstream(audiosystem.java:1145)     @ org.game.pacman.<init>(pacman.java:94)     @ org.game.pacman.run(pacman.java:80)     @ org.menu.start.main(start.java:82) 

so solved issue image not sound file. image had place in new ressource folder , not old one. sound when still previous message error due line :

sample[4]=audiosystem.getaudioinputstream(this.getclass().getresource("ressources/sounds/dubit.wav"));  

nevermind had issues file location. moved .wav new corresponding class file. participation !


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -