0

I am trying to create a new server in Eclipse using Glassfish but when I try to specify the path to my JDK Eclipse wont recognize it. I am getting the same error with Payara as well. I am currently running Antergos Linux. See the image under for example of the error.

Error message in Eclipse:

Error message in Eclipse

Any ideas what is causing this? I dont know what information to publish here so please request if there is something you want to know.

BackSlash
  • 21,927
  • 22
  • 96
  • 136
  • Did you try removing the `/bin` part from the path? – BackSlash May 18 '18 at 12:53
  • When I remove the `/bin` I get the following error: `Java Development Kit (JDK) is required rather than a JRE`. – Tommy Riska May 18 '18 at 12:56
  • 1
    Then you installed a JRE instead of a JDK. A JDK is required, so you need to install it. – BackSlash May 18 '18 at 13:01
  • Hmm, when I do `pacman -Ss jdk` it says that jdk10-openjdk is installed. Would guess by the name that this was the JDK and not the JRE? – Tommy Riska May 18 '18 at 13:08
  • It seems it is a jdk. Then the issue is that you are simply pointing to the wrong path: the path you entered contains the JRE, you need to find out where the JDK was installed and use that path instead (still without the `/bin` part) – BackSlash May 18 '18 at 13:09
  • I cant get this to work. I have tried to reinstall the JDK and tried to explicitly download the JDK from Oracles website but with no luck. I just don't understand how this isn't working, shouldn't be that hard. – Tommy Riska May 18 '18 at 14:24

1 Answers1

1

Neither GlassFish 5 nor Payara Server work with JPMS (introduced in Java 9) yet.

The current target is for Payara to be compatible with Java 11, as seen on the support lifecycle: https://www.payara.fish/support_lifecycle

What this means is that it will probably be the 5.184 version of Payara that will be the first to (officially) support JPMS.

The solution for now is to continue to use Java 8, which should be available at least until January 2019.

Mike
  • 4,852
  • 1
  • 29
  • 48
  • Thanks, it worked great with JDK 8! Tried to research what java versions glassfish and payara supported but could not find anything. Weird that I didn't find the link you provided... – Tommy Riska May 19 '18 at 15:29