Gradle changed the way you specify target platforms. If Netbeans is using a 
recent gradle you may need 
to investigate the 'toolchain' support in the java plugin. That allows you to 
separate the java that
gradle runs in from the version you are compiling against; if necessary gradle 
will provision itself
with a jdk of the requested version.


----- Original Message -----
From: "* William" <william.full.m...@gmail.com>
To: "users" <users@netbeans.apache.org>
Sent: Wednesday, September 8, 2021 4:54:22 AM
Subject: Specify Java Platform?

Hello all,

I hope you are going well in your part of the world.  In the past, with the
Gradle plugin it was possible to specify the Java runtime and libries used
when exercising and testing the program.

[image: image.png]

How may I do this with the current Netbeans 12 release?

We are using gradle and I have a Java 8 target platform but when the
program runs we get class version errors:

17:20:57.411 DEBUG org.eclipse.jetty.servlet.ServletHolder - Servlet.init
org.glassfish.jersey.servlet.ServletContainer@1f53a5dc for
org.glassfish.jersey.servlet.ServletContainer-2049a9c1
Sept 08, 2021 5:20:57 PM
org.glassfish.jersey.server.internal.scanning.AnnotationAcceptingListener$ClassReaderWrapper
accept
WARNING: Unsupported class file major version 60

In this build we have ...

   - sourceCompatibility = '1.8'
   - targetCompatibility = '1.8'

With the older Netbeans setting the platform appropriately was also
required.  The Netbeans 12 requiring a modern JDK as it is; what's required
to cross-compile build and run, to test and debug under a JDK 1.8 ?

Can it (still) be done ?

Thanks in advance.

aloha,
         \_w_/
 ___________________________________

Reply via email to