2

I get this error whenever I open an external folder from inside my running Java program:

fatal: Not a git repository (or any of the parent directories): .git

As far as I can tell, everything is working perfectly and the error perplexes me.

The code used to open the folder:

File file = new File(saveDirectory);
Desktop desktop = Desktop.getDesktop();
try {
    desktop.open(file);
} catch (IOException e) {
    e.printStackTrace();
}

I am building the program in Eclipse Juno and it is a git repository as well

1 Answer 1

3

There's a bug regarding this same error.

Update the bundler and see if it works. Apparently some bundlers remove the .git directory.

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

2 Comments

I've just been through all of the git preferences on eclipse, no mention of a bundler of any kind, also I'm struggling to comprehend what it is even for and what Gems are... I'll have another look tomorrow methinks, thanks for the quick reply!
It may not be your case, but I thought it may be helpful to know that sometimes these are in fact bugs and not programmer's fault. ; )

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.