I have multiple Java projects in Eclipse. I would like to reuse some classes in my new project from my old project. What is the best way to do that in Eclipse?
I.e. is it possible to add another "project folder" to the build-path for my new project?
Eclipse can't do that automatically, You will have to go to one class, press control+a then control+c then go to the other class and press control+v.
Yes, in the build path dialog (Build Path > Configure Build Path...), go to the Projects tab, and add the project dependencies.
On the included project, you can use the Order and Export tab to select, which parts of your source folders and libraries to export to dependent projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With