2

My question is very simple. How do I upgrade Netbeans 8.2 to use Jave EE 8?

I have installed a plain NB 8.2 and glassfish 5. Java 1.8 and tried with java 9.

I have installed the GF 5 server to be controlled through NB. When I create a new Maven web application project i can choose Java EE 7 as runtime.

I have downloaded the nightly build too to try is, but I see the same result.

Is there a cook book or something that describes how to upgrade the entire system to the latest version?

I have searched high and low without any results.

I have check the Java EE 8 tutorial but it dosn't expalin it either.

Kim

Kim Gabrielsen
  • 435
  • 2
  • 6
  • 21

1 Answers1

0

Netbeans does not currently directly support Java EE 8, however you can get the same result by manually setting your project to depend on Java EE 8 apis. This can be done if you are using maven by adding it as a dependency to your pom.xml:

<dependency>
    <groupId>javax</groupId>
    <artifactId>javaee-api</artifactId>
    <version>8.0</version>
    <scope>provided</scope>
</dependency>
Jonathan Coustick
  • 1,127
  • 9
  • 19
  • Unfortunately it's not as simple as that. While changing `` to 8.0 in pom.xml is valid, Netbeans will still create a file named "{project}/target/endorsed/javaee-endorsed-api-7.0.jar" when you clean/build the project. You might think you can just replace javaee-endorsed-api-**7.0**.jar with javaee-endorsed-api-**8.0**.jar but (AFAIK) that file does not exist anywhere. What do you do next? Start hacking the project's metadata?... – skomisa Oct 12 '18 at 17:56