I can locate a file that is in my class folder for INPUT using the following code: ClassLoader loader = getClass().getClassLoader(); InputStream is = loader.getResourceAsStream( "AFile.txt" ); How to locate a file (in the same folder as the class) for OUTPUT using similar trick? getResourceAsStream() does not return an OutputStream! Thanks.
BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design