Start GlassFish server with JDK11 in NetBeans IDE - netbeans

I try to run the Glassfish server 6.2.2 on JDK11 which Officially supports JDK 11 on NetBeans 12.5 which itself should have Jakarta EE 9 GlassFish 6 Support. If I start GlassFish I get a message from NetBeans saying
GlassFish server could not be started with JDK 11 (Default). Pleas select another Java SE Plattform.
If I start GlassFish server via asadmin it works as a charm. So I am guessing it is a NetBeans issue.
Is there a workaround to get this to work or am I missing something?
I have read Problem with Glassfish server on netbeans JDK not which was asked only a couple of days ago and also Does GlassFish server 5.1 can started with JDK15 and also Start Glassfish in Netbeans 10 with JDK11 but they are all about older GlassFish versions prior to version 6.
EDIT
By the way: if I try to start GlassFish 6.2.2 with JDK8 I get an error message
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occured. Program will exit.
Unrecognized option: --add-opens=jdk.management/com.sun.management/com.sun.management.internal=ALL-UNNAMED
So I have no possibility to start the server at all.

While the Release Notes for NetBeans 12.5 state "Jakarta EE 9 GlassFish 6 Support", the information on the associated GitHub link titled "Jakarta EE 9 GlassFish 6 Support #2902" clarifies the extent of that support:
Adds support for GlassFish 6 automatic registration; Prepares for
Jakarta EE 9.1 and GlassFish 6.1.0, although not yet enabled for
automatic registration.
So NetBeans 12.5 does not support the use of Glassfish 6.2.x. Bear in mind that NetBeans 12.5 was released on September 13, nearly three weeks prior to the release of Glassfish 6.2, so the lack of support is hardly unreasonable.
For more details on why GlassFish 6.2.x won't work with NetBeans 12.5, see these comments from NetBeans issue 5734: JDK-Selection for Glassfish 6.1 is restricted to JDK 1.8
Netbeans expects to have a description of every Glassfish
distribution, and 6.2 has yet to be done. Unfortunately ATM when you
select 6.2.x it defaults to the nearest major version which is 6.0,
and JDK is therefore restricted again, which is correct in that
version.
It looks like support for GlassFish 6.2.x will be included in NetBeans 12.6 which is currently scheduled for release later this month, sometime between November 15th and November 30th.
Updated 12/8/21: The OP has confirmed that this issue is resolved with NetBeans 12.6, which was released on 11/29/21.

Related

Eclipse 2019-09 R Cannot Install Tomcat 9

Hi I tried to install tomcat9.0 on Eclipse but I got "unknown version of tomcat was specified" and the "next" button is dimmed. Any idea to fix it?
Tomcat 9 is not the only version that explicitly supports Java 8: If you check this page, you will see that "Supports Java version: 8 and later", which in this context means, that it officially supports only Java 8 and above. It does not mean however this is the only one supporting Java 8. Theoretically, you should be able to use any Tomcat version, in practice a.
Tomcat 8 will work perfectly: well since it supports Java 7 and above. The majority of people with a Java8 + Tomcat combination are using Tomcat 8. Tomcat 8 also has Eclipse WTP support.

Wildfly 8.1 compatibility with Openjdk

I am using Widlfly 8.1 on production with JDK 8. I would like to update JDk to latest OpenJdk version.
Could you please tell me Wildfly 8.1 compatibility with latest Openjdk version?
According to the Getting Started Guide:
Requirements
Java SE 7 or later (we recommend that you use the latest update
available)
Having said that I would stick with a LTS release (Java 8 or Java 11) as the sub releases don't get as thorough of testing (from the Wildfly 18 release notes, JDK 13 section):
While we do want to run well on the most recent JDK, our
recommendation is that you run WildFly on the most recent long-term
support release, i.e. on JDK 11 for WildFly 18. We do considerably
more testing of WildFly itself on the LTS JDKs, and we make no attempt
to ensure the projects producing the various libraries we integrate
are testing their libraries on anything other than JDK 8 or 11.
WildFly 18 also is heavily tested and runs well on Java 8. We plan to continue to support Java 8 at least through WildFly 21, and
probably beyond.
I have been running Wildfly on OpenJDK versions for a year plus now and have had zero issues.

Can't install glassfish server in eclipse oxygen

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
[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

Why Glassfish Server 4.1 is not Installing in Eclipse (Luna x86)?

I have a problem installing/configuring Glassfish Server 4.1 in Eclipse Luna x86 in windows 8. I m working with Java EE 7, and for my projects I need Glassfish Server 4.1, but eclipse shows me the following error:
Image error in GlassFish - Eclipse Luna
How can I solve this error?
I need it for testing my Java EE 7 application.
I had the same problem. I solved it by installing GlassFish Tool available from:
https://blogs.oracle.com/theaquarium/entry/spotlight_on_glassfish_4_19
... just follow that article and be aware that the UI uses the generic 'GlassFish 4' version, which encompass 4.1 as well!
After restart of your IDE it should work's fine.

Eclipse Helios support for WAS 6.1

I am trying to deploy my java web project to websphere application server v6.1 using Eclipse.
But I don't see any Websphere6.1 server in Eclipse - Sever view. I see till websphere 6.0.
Any idea?
Regrettably, there is no support for WebSphere 6.1 under Eclipse. As you noted, WebSphere 6.0 was supported, and now WebSphere 7, 8, and 8.5 are supported, but 6.1 was not (except in the IBM-branded version of Eclipse, Rational Application Developer).