That works for me.  I did dig around and found the task name and property
in the run.single "Build Action" for the project.  It just meant digging a
little bit deeper than I was expecting and realizing that I could define my
own runSingle task instead of relying on the one NB must be adding
dynamically.

This is the sort of thing that should find a place in documentation.  Mayne
here: Java SE Learning Trail (apache.org)
<http://netbeans.apache.org/kb/docs/java/index.html>  There is a small
section for Maven, but nothing for Gradle.

Yes, I know, pull requests are welcome :-)

Cheers,

Scott

On Wed, Mar 3, 2021 at 12:55 PM Laszlo Kishalmi <laszlo.kisha...@gmail.com>
wrote:

> Well, that's not really supported without any tweaks.
>
> There is workaround though:
>
> Create a custom task named: runSingle (It might be a JavaExec type) in
> your Gradle build. It can use the following project properties:
>
> runClassName for the main class to be run and runArgs which is a string
> for the arguments (needed to be processed to array first), if that's
> being used
>
> Configure your extra JVM Args in the runSingle task.
>
>
> On 3/3/21 9:35 AM, Scott Palmer wrote:
> > Just a quick question... How do I configure JVM options for running a
> > single file (via right-click) for a Gradle project in NB 12.x?
> > (I need to add a javaagent.)
> >
> > If there are docs somewhere please let me know.
> >
> > Thanks,
> >
> > Scott
>
> ---------------------------------------------------------------------
> 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
>
>

Reply via email to