I find a related question here- java how to use classes in other package?
But, in my case, I want Class A of ProjectA to be used in ClassB of Project B. Project A and Project B are located in different eclipse workspaces or two different folders.
Is this possible, without putting both projects in one folder?
You can import a existing project to your project without copy it into your workspace folder. So ProjectB will be in another folder but you can use it in your workspace.