Results 1 to 4 of 4
Thread: Where is output.txt?
- 11-18-2009, 04:58 AM #1
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
Where is output.txt?
I created a FileWriter called outstream, and so I specified its destination as:
outStream = new FileWriter("output.txt");
I was able to run my program without any bugs, but now I have no clue as to where the output was actually written. I'm currently using Windows Vista, and I'm using Eclipse 3.5 Galileo.
-
Put in the line:
And then check out that directoryJava Code:System.out.println("user.dir");
- 11-18-2009, 06:00 AM #3
Member
- Join Date
- Oct 2009
- Posts
- 6
- Rep Power
- 0
I tried to use that line, without the quotes as well, but it didn't understand what user was. I'm not sure if that means to replace user with my own username, but I don't know what that is either. Thanks, though.
I figured out a different solution. I ended up just going to File -> Open File, then I just inserted into the search box to find it on my computer. I'm still puzzled as to why it wasn't in a more obvious place.
- 11-18-2009, 06:14 AM #4
"user.dir" is a property - retrieved via System.getProperty.
The posted code didn't call the method, it was a typo.
Run this line (exactly as is) - that's where the file will be saved.
Java Code:System.out.println(System.getProperty("user.dir"));CodesAway - codesaway.info
writing tools that make writing code a little easier
Similar Threads
-
Java, output string, getting correct output? HELP!
By computerboyo in forum New To JavaReplies: 2Last Post: 02-25-2009, 11:44 PM -
what the outPut
By alksam in forum Advanced JavaReplies: 5Last Post: 12-25-2008, 01:44 PM -
different output
By pro85 in forum Java AppletsReplies: 6Last Post: 08-05-2008, 01:42 PM -
Why the output is always zero
By mehrotra.chitij in forum New To JavaReplies: 12Last Post: 04-25-2008, 04:05 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks