writing a file to a directory

Ok so I know when you create a file it will write a file to the directory where sources are located I believe thats correct cuz thats what it does in Eclipse. Now how do you specify a directory name.Thank you
[222 byte] By [vandit2kxa] at [2007-10-3 3:18:24]
# 1
How exactly are you writing the file? In any case, you probably specify a File object as the target when constructing whatever OutputStream; see below for several ways to create one for the path that you want. http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html
Lokoa at 2007-7-14 21:10:08 > top of Java-index,Java Essentials,New To Java...
# 2
Well use the absoulte path.you can make a File object or use a FileOutputStream on both cases you define the path, absoulte or relative.for example you must be pasing a string as parameter to the method, just pass it with all the path. bye.
MelGohana at 2007-7-14 21:10:08 > top of Java-index,Java Essentials,New To Java...
# 3
Actually I believe you can use relative paths as well to specify other directories.You just have to specify SOME other path.
paulcwa at 2007-7-14 21:10:08 > top of Java-index,Java Essentials,New To Java...