ClassLoader getResourceAsStream returns null
问题 My project directory structure (in Eclipse): MyProject/ src/ --> "source directory" on Eclipse's classpath/buildpath com.me.myapp Driver myconfig.txt In Driver , I have the following code: public class Driver { public static void main(String[] args) { InputStream is = ClassLoader.getSystemClassLoader.getResourceAsStream("myconfig.txt"); if(is == null) System.out.println("input stream is null"); else System.out.println("input stream is NOT null :-)"); } } When I run this I get the following