I'm working on a game in java. I started my project in eclipse on a different computer, and now that I exported it out of eclipse on my old computer, copied it to my eclipse workspace on my new computer, imported it in to eclipse, also verified all of my properties are the same on both computers build path java version (SE 1.8), etc. Now all of my Class.class.getResourceAsStream calls are returning null. Even though it works fine on my old computer.
More specifically I have this code
InputStream in=Class.class.getResourceAsStream(file);
BufferedReader reader=new BufferedReader(new InputStreamReader(in));
Where file="guis/guiVertexShader.txt"
So my issue is that Line 1 returns null in eclipse but, if I export my project and make it into a Fat jar, with all of the jars/natives for LWJGL 2 it works fine. Also in eclipse, the below works
InputStream in=new FileInputStream(System.getProperty("user.dir")+"/src"+file);
Although I know I need to use getResourceAsStream so that I can export to a jar. Any ideas?