6

I have a fresh installation of Eclipse IDE for Java EE Developers - for WIndows 64bit - Version: Neon.2 Release (4.6.2)

I have downloaded the newest editions of GlassFish server 4.1.1 - both Full & Web Profie

I've installed the latest GlassFish tolls using Eclipse Marketplace:
https://marketplace.eclipse.org/content/glassfish-tools


Now I am trying to add GlassFish Server to Eclipse using the latest JDK 8, but it complains that Java 6 or 7 is required:

enter image description here


OK, then I am trying to use the latest JDK 7 instead of 8, but this time it complains that this is an invalid GlassFish instalation.

enter image description here


How can I add GlassFish server to Eclipse, what am I doing wrong ?

krokodilko
  • 35,300
  • 7
  • 55
  • 79

2 Answers2

11

After lots of trials and errors I finally managed this issue.
A glassfish subdirectory must be pointed instead of base installation directory, and everything works fine.

enter image description here

krokodilko
  • 35,300
  • 7
  • 55
  • 79
  • +1, Adding the subdirectory solved it. The error msg is strange as it misleads developer to think it as a JDK issue. – Dexter Apr 29 '17 at 19:01
  • If you are getting an issue with "Java 6 or 7 is required", you just need to refresh the page so the error is reset. You can do this by simply editing the location (like deleting and pasting the location again). – gagarwa Jun 05 '17 at 02:11
  • If you are getting an issue with "Java 6 or 7 is required" add an extra bacsklash to the jdk folder and this resolved the issue for me as Joost mentioned below. – Peter H Jun 26 '17 at 05:39
3

As for the "Java 6 or 7 is required"-problem; I managed to get past this by adding a trailing slash to the java location.

/usr/lib/jvm/java-8-oracle  # "Java 6 or 7 is required"
/usr/lib/jvm/java-8-oracle/ # Works

This is on linux, so it might not apply to your windows environment.

Joost
  • 3,169
  • 2
  • 22
  • 40