J
Jesper Sahner
Hi!
I am creating a FileWriter-object in the following way:
FileWriter file = new FileWriter("myfile.txt");
The file "myfile.txt" is then placed in the directory from where Java
is called, in my setup C:\Program Files\NetBeans 3.6
However I want to place the file "myfile.txt" in the same directory
(package) as the .class-file in which the FileWriter-object is
created.
How do I do this?
Regards,
Jesper
I am creating a FileWriter-object in the following way:
FileWriter file = new FileWriter("myfile.txt");
The file "myfile.txt" is then placed in the directory from where Java
is called, in my setup C:\Program Files\NetBeans 3.6
However I want to place the file "myfile.txt" in the same directory
(package) as the .class-file in which the FileWriter-object is
created.
How do I do this?
Regards,
Jesper