netbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djamel torche <djamel.tor...@gmail.com>
Subject Re: Add javaagent to a NetBeans Platform application
Date Mon, 07 Jun 2021 15:02:38 GMT
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 <arcturusbootes2@gmail.com>
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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message