You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Ulrich Mayring <ul...@isys.de> on 2025/03/04 11:47:57 UTC

Use different JDKs in one Project

Hi all,

is it possible to tell Netbeans to use different JDK platforms in one 
project? I have a Gradle parent project and under Build/Gradle Execution 
I can only select one JDK and for all the subprojects this selection is 
greyed out.

I'd like to:

- run a subproject with a different JDK
- run a certain gradle task (tests) with a different JDK

Is that at all possible?

Kind regards,

Ulrich

-- 
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R&D

Tel: +49 (0) 89 46 23 28-0 | Fax  +49 (0) 89 46 23 28-14
email: ulrich.mayring@isys.de

Grillparzerstraße 10 | D-81675 München
www.isys.de

Sitz der Gesellschaft: München | HRB 111760
Geschäftsführer: Stefan Fischer und Max Haller


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

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


Re: Use different JDKs in one Project

Posted by Ulrich Mayring <ul...@isys.de>.
Yes, that is exactly what I'm looking for. But I take it that Netbeans 
doesn't support that via the UI?

So maybe I should define gradle tasks that run with 
"-Dorg.gradle.java.home=/JDK_PATH" or something like that? But it seems 
wrong to code filesystem paths into the buildfile, because those will be 
different on other machines.

Kind regards,
Ulrich

Am 04.03.25 um 14:47 schrieb Pieter van den Hombergh:
> maybe it is better to use different release labels/settings in the super 
> or subproject.
> 
> in that scenario, choose the highest acceptable version as the base 
> version and 'downgrade' the release in the submodules that require it.
> 
> 
> 
> met vriendelijke groet
> Pieter van den Hombergh
> 
> Op di 4 mrt 2025, 12:50 schreef Ulrich Mayring <ulrich.mayring@isys.de 
> <ma...@isys.de>>:
> 
>     Hi all,
> 
>     is it possible to tell Netbeans to use different JDK platforms in one
>     project? I have a Gradle parent project and under Build/Gradle
>     Execution
>     I can only select one JDK and for all the subprojects this selection is
>     greyed out.
> 
>     I'd like to:
> 
>     - run a subproject with a different JDK
>     - run a certain gradle task (tests) with a different JDK
> 
>     Is that at all possible?
> 
>     Kind regards,
> 
>     Ulrich
> 
>     -- 
>     iSYS Software GmbH
> 
>     Ulrich Mayring | Full Stack Developer
>     Technology Lab / R&D
> 
>     Tel: +49 (0) 89 46 23 28-0 | Fax  +49 (0) 89 46 23 28-14
>     email: ulrich.mayring@isys.de <ma...@isys.de>
> 
>     Grillparzerstraße 10 | D-81675 München <https://www.google.com/maps/
>     search/Grillparzerstra%C3%9Fe+10+%7C+D-81675+M%C3%BCnchen?
>     entry=gmail&source=g>
>     www.isys.de <http://www.isys.de>
> 
>     Sitz der Gesellschaft: München | HRB 111760
>     Geschäftsführer: Stefan Fischer und Max Haller
> 
> 
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>     <ma...@netbeans.apache.org>
>     For additional commands, e-mail: users-help@netbeans.apache.org
>     <ma...@netbeans.apache.org>
> 
>     For further information about the NetBeans mailing lists, visit:
>     https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>     <https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists>
> 

-- 
iSYS Software GmbH

Ulrich Mayring | Full Stack Developer
Technology Lab / R&D

Tel: +49 (0) 89 46 23 28-0 | Fax  +49 (0) 89 46 23 28-14
email: ulrich.mayring@isys.de

Grillparzerstraße 10 | D-81675 München
www.isys.de

Sitz der Gesellschaft: München | HRB 111760
Geschäftsführer: Stefan Fischer und Max Haller


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

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


Re: Use different JDKs in one Project

Posted by Pieter van den Hombergh <pi...@gmail.com>.
maybe it is better to use different release labels/settings in the super or
subproject.

in that scenario, choose the highest acceptable version as the base version
and 'downgrade' the release in the submodules that require it.



met vriendelijke groet
Pieter van den Hombergh

Op di 4 mrt 2025, 12:50 schreef Ulrich Mayring <ul...@isys.de>:

> Hi all,
>
> is it possible to tell Netbeans to use different JDK platforms in one
> project? I have a Gradle parent project and under Build/Gradle Execution
> I can only select one JDK and for all the subprojects this selection is
> greyed out.
>
> I'd like to:
>
> - run a subproject with a different JDK
> - run a certain gradle task (tests) with a different JDK
>
> Is that at all possible?
>
> Kind regards,
>
> Ulrich
>
> --
> iSYS Software GmbH
>
> Ulrich Mayring | Full Stack Developer
> Technology Lab / R&D
>
> Tel: +49 (0) 89 46 23 28-0 | Fax  +49 (0) 89 46 23 28-14
> email: ulrich.mayring@isys.de
>
> Grillparzerstraße 10 | D-81675 München
> <https://www.google.com/maps/search/Grillparzerstra%C3%9Fe+10+%7C+D-81675+M%C3%BCnchen?entry=gmail&source=g>
> www.isys.de
>
> Sitz der Gesellschaft: München | HRB 111760
> Geschäftsführer: Stefan Fischer und Max Haller
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: Use different JDKs in one Project

Posted by Giles Winstanley <st...@snaq.net>.
Hi Ulrich,

I don't know if it would work in this context, but it seems reasonable 
to hope that Gradle's Java Toolchains 
(https://docs.gradle.org/current/userguide/toolchains.html) might help 
in this scenario. I've not tried using multiple toolchains within a 
single multi-project build, but given that the aim is to allow Gradle to 
spawn tasks using arbitrary JVMs, it sounds like a good fit. I imagine 
having a top-level "default" toolchain for the main project, and 
overriding it on a per-sub-project basis may work.

Stan

On 04/03/2025 11:47, Ulrich Mayring wrote:
> Hi all,
>
> is it possible to tell Netbeans to use different JDK platforms in one 
> project? I have a Gradle parent project and under Build/Gradle 
> Execution I can only select one JDK and for all the subprojects this 
> selection is greyed out.
>
> I'd like to:
>
> - run a subproject with a different JDK
> - run a certain gradle task (tests) with a different JDK
>
> Is that at all possible?
>
> Kind regards,
>
> Ulrich
>


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

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