Hi! Thank you for the reply. I know the file your talking about and I did try adding the options to it and I sadly get the same error as if I was passing them as command line arguments. Unknown option...
Any advice is greatly appreciated as I am really keen to see what stats I can get out of the app. Thanks. On Tue, 8 Jun 2021 at 01:03, djamel torche <[email protected]> wrote: > Hi there, > With netbeans (and Netbeans platform applications) is event easier:) > Just add your options in etc/netbeans.conf (in > netbeans_default_options="..."). > With Netbeans platform application, that file will be created in build > after your first ant/maven build, I don't remember well but be sure that > when you clean the project this file remains there! (I think not). > > Kind regards > > On Mon, 7 Jun 2021 at 15:40, Arcturus Bootes <[email protected]> > wrote: > > > Hi All, > > > > I have a NetBeans platform application and I'd like to do some APM > > (Application Performance Monitoring) using an Elastic cluster I've got > set > > up. The Elastic APM doco says you need to add the -javaagent flag to > their > > jar like below. > > > > java -javaagent:/path/to/elastic-apm-agent-<version>.jar \ > > -Delastic.apm.service_name=my-application \ -Delastic.apm.server_urls= > > http://localhost:8200 \ -Delastic.apm.secret_token= \ > > -Delastic.apm.environment=production \ > > -Delastic.apm.application_packages=org.example \ -jar my-application.jar > > > > The problem is that a NetBeans platform application does not compile down > > to a single jar like a standalone Java app. For my application I created > a > > distribution zip, unzipped it and from the bin folder tried to run my app > > and pass these arguments but I get the following error: > > > > Unknown option -javaagent:./elastic-apm-agent-1.24.0.jar > > > > I've also tried adding these options to the run.args.extra in the > > project.properties file and that fails as well. > > > > Is there a way I can pass the javaagent to my NetBeans platform > > application? > > > > Thank you. > > >
