LConnor
LConnor

Reputation: 13

Netbeans cloning from GitHub ending up with an empty project

So I'm running Team > Git > Clone from remote and entering the URL for my GitHub repository. I enter my login information and it tells me it successfully clones and it shows up in the repo browser, but no files appear in the newly created project. What obvious thing am I completely missing that would tell me where these files should show up in the new project?

Upvotes: 1

Views: 1395

Answers (1)

WillShackleford
WillShackleford

Reputation: 7018

My guess is there is something wrong with the project files you checked out, like an incorrect path. You can check where it expects sources, by right clicking the project, choosing Properties and select Sources on the left. Under Source Packages it lists where it searches for source files. Normally this is just the relative path src. If you know the correct folder you can add it there.

You can also create a new project with menu option File -> New Project, select category Java and type Java with Existing Sources and then add the top-level directory where your .java files ended up.

Just to be clear if the file SomeClass.java contains the line 'package abc;' then it needs to be in a sub-directory called abc. If you find the file SomeClass.java in

C:\Users\administrator\Documents\NetBeansProjects\somerepo\somedir\abc\SomeClass.java

then the source folder to add would be

C:\Users\administrator\Documents\NetBeansProjects\somerepo\somedir

or a relative path from your project directory, so that you can add \abc\SomeClass.java to get the fullpath to that file.

Also I wouldn't normally do development as Administrator. Are you sure there is not a permissions problem with Netbeans accessing that directory?

Upvotes: 1

Related Questions