12

I am trying to configure everything to develop a web application, but I am not expert about that and I am having problems to start Glassfish.

I installed Netbeans 10, JDK11 and Glassfish 5, but when I try to execute a basic "Hello World!", it returns an error saying "Glassfish server could not be started with JDK11. Please select another Java SE Platform".

Maybe, am I forgettig install something more?

Jose Antonio
  • 123
  • 1
  • 1
  • 7
  • 2
    The error message explains the problem precisely: you can't use JDK 11 with Glassfish 5 in NetBeans. Configure your Glassfish 5 server to use JDK 8 instead and everything will be fine. (You can add JDK 8 as a platform in NetBeans using **Tools > Java Platforms > Add Platform**) – skomisa Apr 01 '19 at 06:55

3 Answers3

10

Only the glassfish server no longer supports the java 11 platform

Therefore,the first you need to install java platform 8: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Then you install it.

Back to Netbean, go to Tools>>Java Platforms>>JDK 1.8

If you have JDK 1.8. you can run your project with JDK 1.8

Hai Quan Le
  • 396
  • 6
  • 11
0
  1. Download jdk 8 with NetBeans 8.2

  2. Download glassfish: https://javaee.github.io/glassfish/download

  3. goto Tools>>>Servers>>>Add server>> choose glassfish>> browse where u just download the glassfish and install.

Jdk 8 will work fine for all your projects

Tuhin
  • 194
  • 4
  • 16
0

You should change to use Payara Server. It works like Glassfish (Maybe it's new version of Glassfish)

dalmate
  • 462
  • 5
  • 13