CLASSPATH
variable, and in subdirectories of those directories.
URL url = name of colocated class.class.getResource(file name); InputStream stream= (InputStream) url.getContent(); InputStreamReader reader = new InputStreamReader(stream);
URL url = name of colocated class.class.getResource(file name); ImageProducer producer = (ImageProducer) url.getContent(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.createImage(producer);