0

We use Java EE and want to use version 8 in Netbeans.

I did the following: Netbeans how to add a JavaEE version?

And this: Upgrade netbeans to JEE 8

Why is there no javaee-endorsed-api version 8? https://mvnrepository.com/artifact/javax/javaee-endorsed-api

I want to tell maven to use version 8, but can't find it anywhere. Is it necessary? Should we remove it from the pom altogether or should we use version 7?

Max
  • 1,107
  • 12
  • 24
  • Are you just asking out of curiosity, or because you truly want to use EE 8 functionality? And which version of NetBeans are you using? – skomisa Dec 08 '18 at 21:12
  • Oracle has a very detailed tutorial for using EE8 with NetBeans: [Your First Cup: An Introduction to the Java EE Platform](https://javaee.github.io/firstcup). Does that help? – skomisa Dec 08 '18 at 21:18

2 Answers2

1

I don't know which version of NetBeans you're using.

If you're using the Oracle NetBeans v8, then just create a Maven web app using an archetype and search of Airhacks. You should see as per images below.

Maven Archetype Maven Archetype

Search for Airhacks Archetype Search for Airhacks Archetype

Fill in as per your need Fill in as per your need

Just fill in the templates in the third image above and you should have a Java EE 8 app.

If you're using Apache NetBeans, then download this distribution which comes with the Java EE setup out of the box and then follow the images above.

Marcos Zolnowski
  • 2,751
  • 1
  • 24
  • 29
Luqman
  • 11
  • 2
1

Irrelevant of IDE, you will need to include the following dependency when developing Java EE 8 applications with Maven:

<dependencies>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>8.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Keep in mind this dependency is the specification, hence why the scope is provided. You will need to deploy your app to a Java EE 8 application container, like GlassFish 5.0 or WildFly 14.

Jose Henriquez
  • 356
  • 2
  • 7