2

how can I use the classes of a package out of the main project where it has been defined? for example imagine there is an Employee class in package people which belongs to ProjectOne. let's assume Employee is needed in another project (ProjectTwo) with the same features.What should I do there?

2 Answers 2

5

Right-click on ProjectTwo in the Package Explorer. Go to Build Path -> Configure Build Path. Go to the Projects tab, click Add, select ProjectOne, and click OK, then click OK again to exit the project properties window.

Then import your classes as usual - within ProjectTwo, you should be able to see ProjectOne's classes as if they were in the same project.

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

Comments

0

Since i dont know wich eclipse your using i tryed this on eclipse kelpler

you can Drag packages into the other Projects src folder to use them

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.