This is mind-boggling... I can make getResource() and getResourceAsStream() work properly when I run Java on my packaged JAR file that includes a text file. (for reference s
I had the same problem in with IntelliJ, the solution for that was, In project settings, add the folder with the resource files, in my case sound files, as source. Add ?*.wav (or your pref filetype) in Settings->Compiler Resource patterns.