9

I recently downloaded Glassfish 5 which is JavaEE 8 compliant, my problem now is that when I try to create a Java Web Application for e.g. I don't see the JavaEE 8 version available, only from JavaEE 5 - 7.

My {netbeans_install_path}/etc/netbeans.conf is pointing to JDK 8:

netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_131"

How do I add JavaEE 8 to the options ?

Esteban Rincon
  • 2,040
  • 3
  • 27
  • 44

2 Answers2

11

How do I add JavaEE 8 to the options ?

NetBeans does not have a Java EE 8 compatible version, yet.

NetBeans is like a glorified text editor with one million additional features, primarily code generators. What it can't autogenerate for you, you can just write yourself as if you were using Notepad like a hardcore programmer ;) Just pick Java EE 7 version, let Netbeans do its boring job of autogenerating the necessary files and then manually edit the location of XML schema resources and versions yourself in the desired deployment descriptor files.

Servlet 4.0 web.xml:

<web-app
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
    version="4.0">

JSF 2.3 faces-config.xml:

<faces-config
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd"
    version="2.3">
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
4

Netbeans > File > New Project...

Categories: Maven and Projects: Project from Archetype

Next

Search: javaee8-essentials-archetype

Select the searched entry

Next

and the rest is history.

abbas
  • 6,453
  • 2
  • 40
  • 36