|
Re: Issue with file I/O integration for compilation [message #1194514 is a reply to message #1193905] |
Mon, 18 November 2013 14:52 |
|
On 11/18/2013 05:53 AM, Andrey Gaganov wrote:
> Hi,
>
> I'm new to the Eclipse IDE, and I need some help. I have a project where
> I import a couple of libraries and compile a java class file. The only
> thing missing is the inclusion of an output file (working-draft.txt).
> Here's what I got on the console:
>
> Exception in thread "main" java.io.FileNotFoundException:
> working-draft.txt (No such file or directory)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:146)
> at Main.main(Main.java:33)
>
> So, I tried to create the blank output file with Eclipse and refreshed
> and ran the project, but the console spits out the same errors.
>
> What do I have to do to let the program find the output file?
>
> Any help would be appreciated.
>
> - Andrey.
This is because of how Java file I/O works; it's nothing to do with
Eclipse. I would suggest that you write another sample program that
creates a file, then go find that file in your filesystem. This will
help you get a feeling for how this works and where you should place
working-draft.txt such that you can find and open it from the program
you're trying to get working.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08845 seconds