8

I have been working on a project locally and at some point I gave the project to someone else to work on. Since that time, I have created another package with classes and so on in my own project version. Since I want the other person to have this package, I gave him the package folder which he copied in the path ProjectName/src/packageName. Of course, he didn't see it right away, so I used New->Source Folder and refresh/clean/pray to make it work.

The question is: is there some other way to add packages to projects? as I'm not sure this is the right solution.

3
  • 1
    I assume that you want to share your codebase? You could also send him the jar file. You could use Eclipse to export the project to a jar and send it to him. Commented May 17, 2012 at 7:57
  • He needs to work on the project code as well, not just use it. Commented May 17, 2012 at 7:58
  • a jar can be viewed simply as an archive i.e a .zip. He can unpack it. Commented May 17, 2012 at 8:10

4 Answers 4

14

A refresh is sufficient after you have dropped the new source files inside the source folder. No need to add a new source folder.

The clean way to collaborate is to use a version control system, like Subversion, git, or whatever. Copying files between developers is a recipe for chaos.

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

1 Comment

We'll be using a version control system, but we havn't yet managed to configure the in-house one :| (and can't/aren't allowed to use anything else)
3

From backend, Go to ProjectName/src and copy/paste all the package, and then right click and select "Refresh".

Comments

1

Simply dropping in the files and refreshing is sufficient. Eclipse will automatically ammend the package declaration in the Java sources.

That all being said, you should be looking at using a version control system such as CVS or subversion for example.

Comments

1
  1. Copy the folder at desired location.
  2. Refresh the project in eclipse. It will be visible now.
  3. Right click on the folder in eclipse under project explorer. Select Build path>Use as source folder.

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.