java - How do I reference one Eclipse project from another? -


i have 2 java projects in eclipse follows:

  1. client (a swing application)

  2. 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:

  1. what doing wrong in setting references?
  2. how build project has classes in no main function? contracts project?

i using eclipse java ee, mars 2.

enter image description here

maybe forgot add other project java build path.

got project properties -> java build path , in tab 'projects' add other project.


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -