Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-05 Thread Andreas Reichel
Hi Owen,

On Wed, 2023-12-06 at 14:01 +1100, Owen Thomas wrote:
> I might use Maven in the future, and I'll hang on to my gradle build at the 
> moment (I'm getting incompatibility errors in my build but these don't seem 
> to have a material influence on what is being built), but I may yet turn back 
> to Ant. 

definitely a good choice and I would be the last one trying to
evangelise you.

> 
> I think Gradle is making things too complicated for Java users. Bad.

Although this is where is disagree strongly: One of the beauties of
Gradle is its ability to include java code snippets as part of the
build, which comes very handy whenever you exceed the standard
features.
I want to illustrate this with one example: Building native C libraries
on varies architectures and bundle them into a Jar, where they are
called by JNA depends on a certain convention on Names and Folders. In
Gradle you script such a mapping logic easily in Java/Groovy. I would
have no idea how to do that in Maven.

One more thing I found very neat is dependency resolution with SNAPSHOT
artifacts and "LATEST.RELEASE". One big contra is the Gradle's API
"stability" though, I won't lie about that.

At the end it all boils down to personal preference and taste (I for
myself despise Maven) and the beauty is about having the choice.
I think that 95% of the users won't even experience any major advantage
of Maven over Gradle or Gradle over Maven, so just choose what you like
most.

ANT is dead as dodo for good, you may be better off with CMAKE if both
Gradle and Maven are not for you.

Cheers
Andreas 



Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-05 Thread Owen Thomas
On Wed, 6 Dec 2023 at 10:38, Andreas Reichel 
wrote:

> 1) dependency resolution (including the understanding, what Class format
> the artifact is providing)
> 2) compiling and packaging based on the built classpath
>
> For 2), any Gradle will do.
> But for 1) Gradle needs to understand the particular Class formats and
> thus depends on the JDK version strictly.
>

Hmm... thanks for this info Andreas.

I would think that the JVM version is given in a jar's environment setup.
It might have to be known to the build tool only to check that the
destination JVM for the build is able to run the built artefact and all its
dependencies.

Anyway, I think Gradle is trying to make me appropriate someone else's
problems. I might use Maven in the future, and I'll hang on to my gradle
build at the moment (I'm getting incompatibility errors in my build but
these don't seem to have a material influence on what is being built), but
I may yet turn back to Ant. Although in a future time I may, I currently
use no third party libraries.

I think Gradle is making things too complicated for Java users. Bad.

>


Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-05 Thread Michael Bien

On 06.12.23 00:32, Owen Thomas wrote:
This matrix is just doing my head in, because all I can gather from 
the page disclosed is a mechanism - I don't understand why the 
mechanism needs to exist in the first place.


because gradle uses kotlin and groovy as the config file format 
language, languages which are implemented on top of java (its more 
complicated but this is the simple version). They will always lack a bit 
behind in supporting the latest java version. Gradle has to wait for all 
dependencies to be ready before it can claim in a release that it 
supports Java X.


The exact same thing happens in NB, gradle 8.5 was released too late to 
be tested and integrated into NB 20, so it ships with gradle 8.4. NB 21 
will whip with whatever is ready when the release candidate phase starts.


btw upgrading gradle in NB is relatively easy, you can do it yourself, 
open a PR and you have a NB dev build which includes a jdk 21 compatible 
gradle release, example: https://github.com/apache/netbeans/pull/6553



Now lets compare this with other build tools like apache maven or ant, 
they use XML as their file format. The last spec change to XML was in 
the year 1820 (estimated). I just tested it, and even a 14 years old 
release of maven (2.1) works fine on JDK 21 (but please don't try this 
at home, running end-of-life network connected libs is not a good idea - 
this was just an experiment to proof a point). This problem essentially 
doesn't exist with maven and ant.


hope this helps,

-mbien




I don't think the version of a build tool should need to be matched 
with a version of the JVM - but this is indeed probably merey my 
ignorance of the justification for this necessity speaking. Is there a 
page that informs my ignorance?


On Wed, 6 Dec 2023 at 03:23, Bernd Michaely  
wrote:


https://docs.gradle.org/current/userguide/compatibility.html

On 04.12.23 01:24, Owen Thomas wrote:
>
> Is there a page I can read that outlines how Gradle will work with
> Java in the future? This stuff is giving me a headache.
>



Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-05 Thread Andreas Reichel
Owen,

from what I understand, Gradle solves 2 different tasks:

1) dependency resolution (including the understanding, what Class
format the artifact is providing)
2) compiling and packaging based on the built classpath

For 2), any Gradle will do.
But for 1) Gradle needs to understand the particular Class formats and
thus depends on the JDK version strictly.

Cheers!


Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-05 Thread Owen Thomas
Thanks for that; Maybe I'm not keeping enough attention to what is going on
here to really make a constructive comment, butI was looking more for
justification of the existence of this "compatibility matrix" and Gradle's
future intentions in supporting Java. This matrix is just doing my head in,
because all I can gather from the page disclosed is a mechanism - I don't
understand why the mechanism needs to exist in the first place.

I don't think the version of a build tool should need to be matched with a
version of the JVM - but this is indeed probably merey my ignorance of the
justification for this necessity speaking. Is there a page that informs my
ignorance?

On Wed, 6 Dec 2023 at 03:23, Bernd Michaely  wrote:

> https://docs.gradle.org/current/userguide/compatibility.html
>
> On 04.12.23 01:24, Owen Thomas wrote:
> >
> > Is there a page I can read that outlines how Gradle will work with
> > Java in the future? This stuff is giving me a headache.
> >
>


Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-05 Thread Bernd Michaely

https://docs.gradle.org/current/userguide/compatibility.html

On 04.12.23 01:24, Owen Thomas wrote:


Is there a page I can read that outlines how Gradle will work with 
Java in the future? This stuff is giving me a headache.




OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-04 Thread Laszlo Kishalmi
Indeed you are right! It seems the bootclasspath is set to the runtime 
classpath, that means the Java 21 syntax elements would be available in 
the editor, but the new API won't.


Oh, so many things to do...

On 12/4/23 16:41, Ernie Rael wrote:

Thanks for the discussion Laszlo,

After reading your post (more than once) I tried a variety of 
different things, including settings the toolchain version to "21" and 
also "options.release = 21" for the hell of it.


gradleproject1:lib > properties > Sources > Source/Binary Format

is 21. When I add the line

import java.util.SequencedCollection;

It's highlighted as an error in the editor; though it does 
clean/build. It looks like the Source/Binary Format property, which 
/is being picked up by gradle/, is not being used by the IDE-editor. 
(I remember https://github.com/apache/netbeans/pull/4711 which fixed 
this value for gradle because "This information is used by 
editor/hints.", but things evolve).


And when I change

gradleproject1 > properties > Build > GradleExecution > Java Runtime

to JDK 21, the editor errors go away but the warnings from project 
problems comes on.


Bottom line, AFAICT,

NB-20 Cannot open a "gradle with Java" project that uses JDK-21
APIs without warnings/errors

no matter how the project is setup.

-ernie

On 23/12/03 5:58 PM, Laszlo Kishalmi wrote:


Well, the rapid changes of Java put pressure on the tool platforms, 
and JVM based languages. That makes our life more difficult.


As of NetBeans, it was quite a fight to move away from Java 8 as a 
runtime platform. That does not mean that  NetBeans does not support 
Java 8 any more, rather, that You need to run NetBeans at least on 
Java 11. As of NetBeans 20, It runs on Java 11 - Java 21, while 
supports Java 8 - Java 21



As of Gradle. Gradle supports Groovy and Kotlin as base of its DSL. 
Usually when the new JVM comes out both Groovy and Kotlin takes some 
time to support running on the new JVM. So they are not in an easy 
position, especially as they still need to support running on Java 8 
fro a while.


In order to cope with that challenge Gradle stated to use a Java 
Toolchain system, which decouples the Runtime Gradle is running on 
from the Java version it is using during the builds.


If I remember well, on 8.4 they found themself in the situation with 
Java 21, where the Groovy parts were able to run on Java 21 while the 
Kotlin related things were not able to run on Java 21 VM. Java 21 
Toolchain was ready by then. That means Gradle 8.4 itself is not able 
to run on Java 21, but able to use Java 21 for builds.


With Gradle 8.5, it is also able to run on Java 21 VM.

It would be nice if NetBeans would be automatically select a good 
Java Runtime for Gradle out of the box though. We have all the parts 
in NetBeans to be able to make it happen, somebody just would need to 
do the job.



Addendum: Before Gradle 8.5, Gradle java projects, generated with 
Gradle were using the Java version of the Gradle Runtime as the Jave 
version for the new project. That's been changed as of: 
https://docs.gradle.org/8.5/release-notes.html#build-init


So what is happening now when creating a new project on NB20 is 
running on Java 21 with Gradle 8.4 Tooling (that's the one NB20 is 
bundling), when using the defaults .
 1. NetBeans invokes gradle init with Java 21, as Gradle 8.4 Groovy 
parts works with Java 21, it will create a new project, with java 
toolchain 21


 2. NetBeans knows that Gradle 8.4 is not Java 21 Runtime comaptible 
(that's hard coded in NB). So it simply refuse to load the project, 
while the Gradle Java runtime is set to Java 21 (Default).


That's when people get confused.

Again NB should do a better job selecting the Gradle Java runtime.


On 12/3/23 17:20, Ernie Rael wrote:

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

"Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

"Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when 
it was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.

Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-04 Thread Ernie Rael

Thanks for the discussion Laszlo,

After reading your post (more than once) I tried a variety of different 
things, including settings the toolchain version to "21" and also 
"options.release = 21" for the hell of it.


   gradleproject1:lib > properties > Sources > Source/Binary Format

is 21. When I add the line

   import java.util.SequencedCollection;

It's highlighted as an error in the editor; though it does clean/build. 
It looks like the Source/Binary Format property, which /is being picked 
up by gradle/, is not being used by the IDE-editor. (I remember 
https://github.com/apache/netbeans/pull/4711 which fixed this value for 
gradle because "This information is used by editor/hints.", but things 
evolve).


And when I change

   gradleproject1 > properties > Build > GradleExecution > Java Runtime

to JDK 21, the editor errors go away but the warnings from project 
problems comes on.


Bottom line, AFAICT,

   NB-20 Cannot open a "gradle with Java" project that uses JDK-21 APIs
   without warnings/errors

no matter how the project is setup.

-ernie

On 23/12/03 5:58 PM, Laszlo Kishalmi wrote:


Well, the rapid changes of Java put pressure on the tool platforms, 
and JVM based languages. That makes our life more difficult.


As of NetBeans, it was quite a fight to move away from Java 8 as a 
runtime platform. That does not mean that  NetBeans does not support 
Java 8 any more, rather, that You need to run NetBeans at least on 
Java 11. As of NetBeans 20, It runs on Java 11 - Java 21, while 
supports Java 8 - Java 21



As of Gradle. Gradle supports Groovy and Kotlin as base of its DSL. 
Usually when the new JVM comes out both Groovy and Kotlin takes some 
time to support running on the new JVM. So they are not in an easy 
position, especially as they still need to support running on Java 8 
fro a while.


In order to cope with that challenge Gradle stated to use a Java 
Toolchain system, which decouples the Runtime Gradle is running on 
from the Java version it is using during the builds.


If I remember well, on 8.4 they found themself in the situation with 
Java 21, where the Groovy parts were able to run on Java 21 while the 
Kotlin related things were not able to run on Java 21 VM. Java 21 
Toolchain was ready by then. That means Gradle 8.4 itself is not able 
to run on Java 21, but able to use Java 21 for builds.


With Gradle 8.5, it is also able to run on Java 21 VM.

It would be nice if NetBeans would be automatically select a good Java 
Runtime for Gradle out of the box though. We have all the parts in 
NetBeans to be able to make it happen, somebody just would need to do 
the job.



Addendum: Before Gradle 8.5, Gradle java projects, generated with 
Gradle were using the Java version of the Gradle Runtime as the Jave 
version for the new project. That's been changed as of: 
https://docs.gradle.org/8.5/release-notes.html#build-init


So what is happening now when creating a new project on NB20 is 
running on Java 21 with Gradle 8.4 Tooling (that's the one NB20 is 
bundling), when using the defaults .
 1. NetBeans invokes gradle init with Java 21, as Gradle 8.4 Groovy 
parts works with Java 21, it will create a new project, with java 
toolchain 21


 2. NetBeans knows that Gradle 8.4 is not Java 21 Runtime comaptible 
(that's hard coded in NB). So it simply refuse to load the project, 
while the Gradle Java runtime is set to Java 21 (Default).


That's when people get confused.

Again NB should do a better job selecting the Gradle Java runtime.


On 12/3/23 17:20, Ernie Rael wrote:

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

"Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

"Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when it 
was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JD

Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Laszlo Kishalmi
Well, the rapid changes of Java put pressure on the tool platforms, and 
JVM based languages. That makes our life more difficult.


As of NetBeans, it was quite a fight to move away from Java 8 as a 
runtime platform. That does not mean that  NetBeans does not support 
Java 8 any more, rather, that You need to run NetBeans at least on Java 
11. As of NetBeans 20, It runs on Java 11 - Java 21, while supports Java 
8 - Java 21



As of Gradle. Gradle supports Groovy and Kotlin as base of its DSL. 
Usually when the new JVM comes out both Groovy and Kotlin takes some 
time to support running on the new JVM. So they are not in an easy 
position, especially as they still need to support running on Java 8 fro 
a while.


In order to cope with that challenge Gradle stated to use a Java 
Toolchain system, which decouples the Runtime Gradle is running on from 
the Java version it is using during the builds.


If I remember well, on 8.4 they found themself in the situation with 
Java 21, where the Groovy parts were able to run on Java 21 while the 
Kotlin related things were not able to run on Java 21 VM. Java 21 
Toolchain was ready by then. That means Gradle 8.4 itself is not able to 
run on Java 21, but able to use Java 21 for builds.


With Gradle 8.5, it is also able to run on Java 21 VM.

It would be nice if NetBeans would be automatically select a good Java 
Runtime for Gradle out of the box though. We have all the parts in 
NetBeans to be able to make it happen, somebody just would need to do 
the job.



Addendum: Before Gradle 8.5, Gradle java projects, generated with Gradle 
were using the Java version of the Gradle Runtime as the Jave version 
for the new project. That's been changed as of: 
https://docs.gradle.org/8.5/release-notes.html#build-init


So what is happening now when creating a new project on NB20 is running 
on Java 21 with Gradle 8.4 Tooling (that's the one NB20 is bundling), 
when using the defaults .
 1. NetBeans invokes gradle init with Java 21, as Gradle 8.4 Groovy 
parts works with Java 21, it will create a new project, with java 
toolchain 21


 2. NetBeans knows that Gradle 8.4 is not Java 21 Runtime comaptible 
(that's hard coded in NB). So it simply refuse to load the project, 
while the Gradle Java runtime is set to Java 21 (Default).


That's when people get confused.

Again NB should do a better job selecting the Gradle Java runtime.


On 12/3/23 17:20, Ernie Rael wrote:

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

"Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

"Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when it 
was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not 
supported by

Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution 
settings, to avoid this problem!





-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further in

Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Michael Bien

gradle 8.4 release notes:

 > Java 21 is now supported for compiling, testing, and running such 
projects.



gradle 8.5 release notes:

 > Gradle now supports running on Java 21.


(I fell for it too the first time I read it, Gradle 8.4 can not run on 
Java 21)


-mbien



On 04.12.23 02:20, Ernie Rael wrote:

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

"Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

    "Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when it 
was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not 
supported by

Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution 
settings, to avoid this problem!





-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Ernie Rael

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

   "Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

   ./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

   "Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when it 
was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not 
supported by

Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution 
settings, to avoid this problem!





-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Owen Thomas
What's going on with Java and Gradle? Would I be right in supposing that it
would be simpler just to go back to Ant?

Is there a page I can read that outlines how Gradle will work with Java in
the future? This stuff is giving me a headache.

On Mon, 4 Dec 2023 at 10:51, Laszlo Kishalmi 
wrote:

> Well, unfortunately gradle init only supports java version specification
> since Gradle 8.5
>
> NB20 is bundled with Gradle 8.4.
>
> There is a bit workaround needed to run Java 21 projects with Gradle.
>
> Set the Java Runtime version for Gradle in Tools > Options > Java >
> Gradle to Java 20 or below.
>
>  From there you can use any Java version in your Gradle projects,
> whatever that Gradle version support.
>
> Gradle 8.4 does support Java 21 using Java Toolchain, should work.
>
> java {
>  toolchain {
>  languageVersion = JavaLanguageVersion.of(21)
>  }
> }
>
> On 12/3/23 13:30, Ernie Rael wrote:
> > Running NB-20, jdk21.
> >
> > The goal is to play with some JDK-21 APIs...
> >
> > Creating a project using NB's "New Project > Java with Gradle".
> >
> > I can build and run the default "Library" and test. But there's the
> > warning icon and "Resolve Project Problems".
> >
> > Any way to get rid of the warning?
> >
> > -ernie
> >
> >
> > "Resolve Project Problems"
> >
> > The Java version: 21, that is selected for the project is not
> > supported by
> > Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
> > information.
> > Possible solutions:
> > Upgrade your Gradle version on your project
> > Select Java Runtime 20 (or below), on Build > Gradle Execution
> > settings, to avoid this problem!
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> > For additional commands, e-mail: users-h...@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>


Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Laszlo Kishalmi
Well, unfortunately gradle init only supports java version specification 
since Gradle 8.5


NB20 is bundled with Gradle 8.4.

There is a bit workaround needed to run Java 21 projects with Gradle.

Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not 
supported by

Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution 
settings, to avoid this problem!





-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Ernie Rael

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not supported by
Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution settings, 
to avoid this problem!





-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists