5

I've got a project running 1.7. I'm getting issues using javax.enterprise.context.RequestScoped. I'm confused as to why it isn't included as I have other javax.* libraries built into Netbeans by default.

Where can I download this library and how can I add it to my project?

3 Answers3

7

By default, only the packages that are part of the Java Standard Edition are available. This library belongs to Java EE. Just go to project->properties->libraries->add library->Java EE Web 7 Api Library->add. That´s it.

Lastrik
  • 25
  • 1
  • 5
SomeDude
  • 71
  • 1
2

It's part of the Java EE Specification. You should start your project within a container. In Netbeans use an Enterprise Application project type.

Community
  • 1
  • 1
chromanoid
  • 545
  • 3
  • 14
  • I tried doing this and I'm still getting an issue importing `javax.enterprise.context.RequestScoped`. I don't have `javax.enterprise.context`. I only have `concurrent` and `deploy`. –  Oct 11 '14 at 14:16
  • 1
    Maybe this helps? http://stackoverflow.com/questions/26076613/the-package-javax-enterprise-context-is-missing-after-glassfish-update Also see here: https://netbeans.org/bugzilla/show_bug.cgi?id=247013 – chromanoid Oct 11 '14 at 14:31
1

Try this: You can import this jar file into your project.

Use cdi-api.jar

I found mine in glassfish folder

.\glassfish-4.1\glassfish\modules

Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92