Well, maybe the solution is simple -- we need to spread the message to
users that tools should follow the technologies and not the other way
around, which makes sense in whatever way you look at it. I.e., if your
technology of choice is Java/Jakarta EE, that means you need to deploy to
JDK 8, and that's what you should download. Next, you look around for tools
to support you in development and so you'll download Apache NetBeans -- at
which point you'll already have JDK 8 and so you'll start up with NetBeans
in synch with GlassFish. That should be the way to think especially in
relation to the situation where there's this accelerated release cycle for
Java, which will leave some technologies behind and maybe not prioritizing
keeping up with the latest releases.

Gj

On Tue, Feb 26, 2019 at 4:25 PM Josh Juneau <juneau...@gmail.com> wrote:

> I just verified under NetBeans 10 that I'm able to compile a Maven-based
> Java EE project under JDK 11 without issues, and deploy to Payara 5 running
> on JDK 8.  So the same issues reside across NetBeans 10 and 11.
>
> In my opinion, I agree that this is problematic.  I just deployed this WAR
> containing a reference to a JDK 11 feature (isBlank()) and it deploys fine,
> but I receive errors indicating NoSuchMethodError when the server attempts
> to run the code. The complete newbie is going to be frustrated by this, no
> doubt.  It would be great if NetBeans would flag a project that is set to
> deploy to a Java EE 8 server if the JDK source version is greater than JDK
> 8.
>
> I've been digging into NetBeans javaee and j2ee modules to try and add this
> support into the IDE.  I will likely not be finished in time for vc2
> though.
>
> On Tue, Feb 26, 2019 at 9:11 AM Geertjan Wielenga
> <geertjan.wiele...@googlemail.com.invalid> wrote:
>
> > All great, but the fact remains that a complete newbie will download
> Apache
> > NetBeans 11 and will probably have whatever the latest JDK is, e.g., JDK
> > 12, will then put together a 'hello world', will then want to deploy...
> and
> > then discover that an additional JDK is needed, i.e., JDK 8, to start
> > GlassFish. I.e., a complete newbie will most likely be required to have
> two
> > different JDKs -- and most likely only discover this when deploying their
> > application. Not very nice, all this.
> >
> > Gj
> >
> >
> > On Tue, Feb 26, 2019 at 3:59 PM Josh Juneau <juneau...@gmail.com> wrote:
> >
> > > GlassFish requires a JDK because it does not include one.  One must
> > utilize
> > > a JDK in order to start up GlassFish server.
> > >
> > > It sounds like the Maven-based web application is starting up without
> > issue
> > > because in this case GlassFish must be configured to start under a
> > > specified JDK 8 installation (not the one indicated within the NetBeans
> > > project).  Therefore, the project is compiling under the specified JDK
> in
> > > NetBeans (in this case JDK11) and deploying the resulting WAR file
> > without
> > > issue to the GlassFish server that is running under JDK 8.
> > >
> > > I just compiled a Maven WAR under JDK 12 in NetBeans and deployed to
> > > GlassFish 5.1 running on JDK 8.  It seemed to work without issues.
> > >
> > >
> > > On Tue, Feb 26, 2019 at 8:13 AM Geertjan Wielenga
> > > <geertjan.wiele...@googlemail.com.invalid> wrote:
> > >
> > > > OK, nice, in some ways.
> > > >
> > > > What's a bit unfortunate is that one can't select a JDK in the New
> > > Project
> > > > wizard for New Web Applications -- whatever JDK is used to start
> > NetBeans
> > > > is assigned to the newly created Java Web application.
> > > >
> > > > The above is true for Ant-based projects and Maven-based projects.
> > > Somehow,
> > > > that's ignored in Maven-based projects, which run without a problem
> on
> > > > GlassFish 5 despite the JDK being JDK 11. So the question comes back
> to
> > > --
> > > > what does GlassFish need the JDK for if it can be ignored,
> apparently,
> > > when
> > > > a Maven-based Web application is able to start up without a problem
> > even
> > > > though it has JDK 11 set? When I look in the POM, there's no
> reference
> > to
> > > > the JDK, so in the case of Maven projects, it seems relevant to how
> > > > NetBeans supports GlassFish or Java EE, and not a requirement for the
> > > Maven
> > > > project to run on GlassFish.
> > > >
> > > > Gj
> > > >
> > > >
> > > > On Tue, Feb 26, 2019 at 3:06 PM Josh Juneau <juneau...@gmail.com>
> > wrote:
> > > >
> > > > > GlassFish 5+ is not currently supported under JDK 9+...that is in
> the
> > > > > works.  I believe the target JDK is for Java SE 11 support.
> > > > >
> > > > > See this issue in the tracker:
> > > > > https://github.com/eclipse-ee4j/glassfish/issues/22130
> > > > >
> > > > > Therefore, GlassFish 5 requires JDK 8.
> > > > >
> > > > >
> > > > > On Tue, Feb 26, 2019 at 7:59 AM Geertjan Wielenga
> > > > > <geertjan.wiele...@googlemail.com.invalid> wrote:
> > > > >
> > > > > > So, not specifically JDK 8, but greater than JDK 8, too? I.e.,
> the
> > > > > modular
> > > > > > JDK, from JDK 9 onwards, is supported by GlassFish?
> > > > > >
> > > > > > And what does GlassFish need the JDK for?
> > > > > >
> > > > > > Gj
> > > > > >
> > > > > > On Tue, Feb 26, 2019 at 2:57 PM Josh Juneau <juneau...@gmail.com
> >
> > > > wrote:
> > > > > >
> > > > > > > Hi Geertjan,
> > > > > > >
> > > > > > > Java EE 8 requires JDK8+, and therefore GlassFish 5/5.1 require
> > JDK
> > > > 8+.
> > > > > > >
> > > > > > > Hope this helps.  Thanks
> > > > > > >
> > > > > > > On Tue, Feb 26, 2019 at 7:52 AM Geertjan Wielenga
> > > > > > > <geertjan.wiele...@googlemail.com.invalid> wrote:
> > > > > > >
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > There's quite some functionality in NetBeans related to
> > > > Java/Jakarta
> > > > > EE
> > > > > > > > that assumes that the project is making use of JDK 8.
> > > > > > > >
> > > > > > > > In particular, this results in these problems:
> > > > > > > >
> > > > > > > > https://issues.apache.org/jira/browse/NETBEANS-2170
> > > > > > > > https://issues.apache.org/jira/browse/NETBEANS-2126
> > > > > > > >
> > > > > > > > So, the question is, which if any specific version of the JDK
> > > does
> > > > > the
> > > > > > > > latest GlassFish releases require?
> > > > > > > >
> > > > > > > > If GlassFish requires JDK 8, then NetBeans is right and users
> > > > should
> > > > > > > simply
> > > > > > > > be told to use JDK 8 with GlassFish. If not, then we need to
> > > change
> > > > > > > > something in NetBeans to enable GlassFish to work with later
> > > JDKs.
> > > > > > > >
> > > > > > > > I'm assuming some tools or files in the JDK are needed by
> > > GlassFish
> > > > > or,
> > > > > > > at
> > > > > > > > least, are needed by GlassFish when run with/from NetBeans.
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > Gj
> > > > > > > >
> > > > > > > --
> > > > > > > Josh Juneau
> > > > > > > juneau...@gmail.com
> > > > > > > http://jj-blogger.blogspot.com
> > > > > > > https://www.apress.com/index.php/author/author/view/id/1866
> > > > > > >
> > > > > >
> > > > > --
> > > > > Josh Juneau
> > > > > juneau...@gmail.com
> > > > > http://jj-blogger.blogspot.com
> > > > > https://www.apress.com/index.php/author/author/view/id/1866
> > > > >
> > > >
> > > --
> > > Josh Juneau
> > > juneau...@gmail.com
> > > http://jj-blogger.blogspot.com
> > > https://www.apress.com/index.php/author/author/view/id/1866
> > >
> >
> --
> Josh Juneau
> juneau...@gmail.com
> http://jj-blogger.blogspot.com
> https://www.apress.com/index.php/author/author/view/id/1866
>

Reply via email to