You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Thomas Kellerer <sh...@gmx.net> on 2023/02/02 07:35:41 UTC

NetBeans 16, Gradle 7.5 and "Run File"

I use NetBeans 16 with Gradle 7.5.1, Java 11.

When I run a class with a main method ("Run File") I get this exception in the output window:

    JAVA_HOME="C:\etc\open-jdk-11"
    cd ******; ..\gradlew.bat --configure-on-demand -PrunClassName=com.mypackage.RunMe -s -x check -x test runSingle
    Configuration on demand is an incubating feature.

    > Configure project :

    The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
      at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:427)
      at org.gradle.api.tasks.JavaExec_Decorated.setMain(Unknown Source)
      at org.netbeans.modules.gradle.tooling.NetBeansRunSinglePlugin.lambda$addTask$2(NetBeansRunSinglePlugin.java:85)


While this doesn't prevent the main class from running, the exception stack trace is a bit annoying. Can I configure NetBeans to do the "Run File" differently to avoid this?


Note that the file is part of a bigger Spring Boot project and build.gradle contains:

    springBoot {
      mainClass = "com.myproject.AppMain"
    }


Regards
Thomas

---------------------------------------------------------------------
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: NetBeans 16, Gradle 7.5 and "Run File"

Posted by Thomas Kellerer <sh...@gmx.net>.
Ah, great. Thanks

It's not a big deal, I can wait for 17


Laszlo Kishalmi schrieb am 03.02.2023 um 04:19:
> This issue is fixed in the upcoming NetBeans 17 (The NetBeans 17-rc3 just got out).
>
> Otherwise you can declare your own runSingle task in your Gradle Project.
>
> On 2/1/23 23:35, Thomas Kellerer wrote:
>> I use NetBeans 16 with Gradle 7.5.1, Java 11.
>>
>> When I run a class with a main method ("Run File") I get this exception in the output window:
>>
>>      JAVA_HOME="C:\etc\open-jdk-11"
>>      cd ******; ..\gradlew.bat --configure-on-demand -PrunClassName=com.mypackage.RunMe -s -x check -x test runSingle
>>      Configuration on demand is an incubating feature.
>>
>>      > Configure project :
>>
>>      The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
>>        at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:427)
>>        at org.gradle.api.tasks.JavaExec_Decorated.setMain(Unknown Source)
>>        at org.netbeans.modules.gradle.tooling.NetBeansRunSinglePlugin.lambda$addTask$2(NetBeansRunSinglePlugin.java:85)
>>
>>
>> While this doesn't prevent the main class from running, the exception stack trace is a bit annoying. Can I configure NetBeans to do the "Run File" differently to avoid this?
>>
>>
>> Note that the file is part of a bigger Spring Boot project and build.gradle contains:
>>
>>      springBoot {
>>        mainClass = "com.myproject.AppMain"
>>      }
>>
>>
>> Regards
>> Thomas



---------------------------------------------------------------------
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: NetBeans 16, Gradle 7.5 and "Run File"

Posted by Laszlo Kishalmi <la...@gmail.com>.
This issue is fixed in the upcoming NetBeans 17 (The NetBeans 17-rc3 
just got out).

Otherwise you can declare your own runSingle task in your Gradle Project.

On 2/1/23 23:35, Thomas Kellerer wrote:
> I use NetBeans 16 with Gradle 7.5.1, Java 11.
>
> When I run a class with a main method ("Run File") I get this exception in the output window:
>
>      JAVA_HOME="C:\etc\open-jdk-11"
>      cd ******; ..\gradlew.bat --configure-on-demand -PrunClassName=com.mypackage.RunMe -s -x check -x test runSingle
>      Configuration on demand is an incubating feature.
>
>      > Configure project :
>
>      The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
>        at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:427)
>        at org.gradle.api.tasks.JavaExec_Decorated.setMain(Unknown Source)
>        at org.netbeans.modules.gradle.tooling.NetBeansRunSinglePlugin.lambda$addTask$2(NetBeansRunSinglePlugin.java:85)
>
>
> While this doesn't prevent the main class from running, the exception stack trace is a bit annoying. Can I configure NetBeans to do the "Run File" differently to avoid this?
>
>
> Note that the file is part of a bigger Spring Boot project and build.gradle contains:
>
>      springBoot {
>        mainClass = "com.myproject.AppMain"
>      }
>
>
> Regards
> Thomas
>
> ---------------------------------------------------------------------
> 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
>

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