vendredi 3 juillet 2015

How to link Eclipse to Java EE 5 SDK?

I am busy setting up an Eclipse (Mars) programming environment for Java EE 5 SDK. (For legacy reason can't use EE7).

In Eclipse/Windows/Preferences Java points to jdk1.6.0_26.

I successfully created an EJB Project with EJB module version=3.0, with JRE definition pointing to jdk1.6.0_26.

Next I create a Session Bean and there the trouble starts. In the resulting bean I have two compiler errors:

    import javax.ejb.Stateless; // not found

    @Stateless // cannot be resolved to a type

It is obvious that the j2ee libraries can't be found.

I do have a jee5 sdk installed.

Question: how do I link Eclipse to this jee5 sdk, so that the compiler error disappears.

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire