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 ?
Apache NetBeans 12.5 runs on JDK LTS releases 8 and 11, with experimental support for JDK 17, i.e., the current JDK release at the time of this NetBeans release. The current JDKs have an issue on macOS Big Sur, that causes freezes on dialogs.
In the New Project wizard you can choose Java EE 6 Web or Java EE 7 Web as the Java EE version.
Deployment platformsApache NetBeans 12.0 runs on the JDK LTS releases 8 and 11, as well as on JDK 14, i.e., the current JDK release at the time of this NetBeans release.
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.
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">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With