s*i 发帖数: 31 | 1 In eclipse, i have project 1, where i define 2 classes and make them both
belong to a package i define (eg: com.myPackage).
Then i create project 2, and i want to use those 2 classes from project 1.
It seems that i can accomplish this two ways:
1) Go to Java Build Path->Projects, add Project 1 as a "Required project"
for Project 2. And write "import com.myPackage.*" statement at the top of
Project 2's source code.
2) Go to Java Build Path->Libraries, click "Add Class Folder", and choose
the fold | g*****g 发帖数: 34805 | 2 Option 1 is probably better, different CVS users have different
root workspace directory and therefore
check out the project to different folder. If you
use option 2, what works for you probably won't work
for others.
【在 s*i 的大作中提到】 : In eclipse, i have project 1, where i define 2 classes and make them both : belong to a package i define (eg: com.myPackage). : Then i create project 2, and i want to use those 2 classes from project 1. : It seems that i can accomplish this two ways: : 1) Go to Java Build Path->Projects, add Project 1 as a "Required project" : for Project 2. And write "import com.myPackage.*" statement at the top of : Project 2's source code. : 2) Go to Java Build Path->Libraries, click "Add Class Folder", and choose : the fold
|
|