Hi I am using Eclipse Oxygen in Ubuntu 18.4 with Oracle Java 10. I tried to install glassfish server in Eclipse but failed. every time I tried it said java development kit is required instead of JRE. I had given the path "/usr/lib/jvm/java-10-oracle". Even if I put the path as "/var/cache/oracle-jdk 10-installer/",it says "Java installer not found in the specified folder". i am putting the two screenshots here for your reference. Please help.Here are the 2 screenshots for the above two cases
Asked
Active
Viewed 412 times
0
-
Its not a duplicate. The location of jdk that I have found is /var/cache/oracle-jdk 10-installer/jdl-10.0.1/ but Eclipse is not happy with that. My Eclipse identified the standard jvm as /usr/lib/jvm/java-10-oracle/ and it contains all the files that a jdk should have. But again Eclipse is not ready to agree. Neither of the two paths are not working. Thats why I seeked your help. And the solution in the link has used a path to jdk as Standard JVM. I don't know how can this be possible. If you have any solution then please reply. – Sandip Nath Jun 11 '18 at 13:00
1 Answers
0
[Note that in this answer I am assuming you are using GlassFish 5.0, which is the latest version]
GlassFish will not currently work on Java 10 due to the JPMS (module system). You need to use Java 8 instead.
You should also be aware that you need specifically Java 8u161 or lower for GlassFish, but the latest release of Java 8 can be used with Payara Server which will work in the same way as GlassFish.
If you really need to use GlassFish on a version of Java 8 higher than u161, then you can use the latest 5.0.1 nightly build

Mike
- 4,852
- 1
- 29
- 48
-
Does this apply to openjdk too? if not then which version of openjdk to use 10 or 11? – Sandip Nath Jun 11 '18 at 16:08
-
Actually I was using glassfish 4.1.1. Can this be used with oracle java 10? – Sandip Nath Jun 11 '18 at 16:15
-
no, there is no version of GlassFish that will work with Java higher than version 8. This is due to the introduction of JPMS in Java 9, so it is the same no matter what JDK you use (OpenJDK, Oracle JDK etc) – Mike Jun 11 '18 at 16:21
-
Incidentally, if you are using GlassFish 4.1.1 then any version of Java 8 will work fine, so just download the latest. – Mike Jun 11 '18 at 16:21
-
Thank you Mike. Then what is the server do you suggest to use with Oracle JDK 10 that will work for JSP, Servlet and EJB other than Tomcat? – Sandip Nath Jun 12 '18 at 05:52
-
There is no complete support for JPMS from any current application server. Servlet containers like Tomcat or Jetty have less to modify for JPMS, so they will be OK. If you need Java EE, though, I would pick whichever appserver you prefer and stay on Java 8 for now. WildFly, Payara Server and Open Liberty all have done work to run on Java 9+, but there are open outstanding issues for all of them. Your app may work with them, but you would be taking a risk with stability. – Mike Jun 12 '18 at 08:38
-