java - How do I reference one Eclipse project from another? -
i have 2 java projects in eclipse follows:
client (a swing application)
contracts (something class library in .net world)
i client reference contracts project. here have done.
i have class in client project so:
package practice.bookyard.client; public interface iauthenticationmanager { operationresult<string> authenticateuser(string username, string password); }
and in contracts project, class so:
package practice.bookyard.contracts; public class operationresult<t> { protected final boolean successful; protected final string errormessage; protected final t data; public operationresult(boolean successful, string errormessage, t data) { this.successful = successful; this.errormessage = errormessage; this.data = data; } public boolean getsuccessful() { return this.successful; } public string geterrormessage() { return this.errormessage; } public t getdata() { return this.data; } }
to reference contracts project client, right-clicked on client project properties, , selected checkbox next contracts project name in list of project references.
however, when try use operationresult<t>
class in client project, doesn't recognize @ all.
so, have 2 questions:
- what doing wrong in setting references?
- how build project has classes in no
main
function? contracts project?
i using eclipse java ee, mars 2.
maybe forgot add other project java build path.
got project properties -> java build path , in tab 'projects' add other project.
Comments
Post a Comment