2

When eclipse creates a file (let's say feeds.txt), the file is automatically saved and read from eclipse folder (not workspace/project folder). How do I change it to workspace/"project name" folder

btw, i used this:

private static final String feedFile = " Feeds.txt";

1 Answer 1

1

what did you use that for? .. if named like that, eclipse should create a new file in the project folder Try this

import java.io.*;

    try {
        File file = new File("Feeds.txt");
            file.createNewFile();

    } catch (IOException e) {
    }

http://www.exampledepot.com/egs/java.io/createfile.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.