Mateus Viccari
Mateus Viccari

Reputation: 7709

How to use the application server libraries in Intellij?

i just started working with Intellij, and it have some things i don't clearly understand. One of these things is that i don't know how to tell the IDE to use the application server libraries, e.g the persistence api or the CDI api, both bundled with glassfish server. So even if my project is configured with glassfish server, if i type "@Named" in one of my classes, the IDE shows an error saying it could not recognize the @Named annotation. And i dont think i should add the cdi libs in the project, there must be an way to make the IDE recognize the libraries from the server. Anyone know how to solve this?

Upvotes: 0

Views: 539

Answers (1)

Leos Literak
Leos Literak

Reputation: 9474

Idea can automatically download the Java EE jars for you and configure them. You must start with intent:

enter image description here

Once IDEA fetches the jars, you will find in your project configuration:

enter image description here

and new library

enter image description here

Upvotes: 1

Related Questions