Javaagent

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
Andrej
Posts: 1
Joined: 14 Dec 2021, 15:31

Javaagent

Post by Andrej »

Hello,

is the parameter -J-javaagent available in Webstart as shown here with Oracle 7 WebStart?
https://community.appdynamics.com/t5/Kn ... ta-p/14745

Janak Mulani
Posts: 817
Joined: 24 Mar 2020, 13:37

Re: Javaagent

Post by Janak Mulani »

I understand that:
1. you have instrumented the the application which you have specified in your Jnlp file and which you want to run using OWS.
2. In the jnlp file you have specified the JVM which will be used to run the application.
3. To this JVM you want to pass the argument like -javaagent:<agent-install-dir>\javaagent.jar

Unfortunately -J command-line option is not handled by Icedtea-Web on which OWS is based.

There is a workaround:

1. Define an environment variable: set JAVAWS_VM_ARGS=-javaagent:<agent-install-dir>\javaagent.jar or specify the ar in jnlp file :
<j2se version="1.8*" java-vm-args="-javaagent:<agent-install-dir>\javaagent.jar"
2. In the OWS's deployment.properties file specify the above vm arg in the whilelist: deployment.jvm.arguments.whitelist=-javaagent:<agent-install-dir>\\javaagent.jar

As mentioned in the appdynamics link you might have to change the policy file of the JVM used by OWS to run your app or specify a custom policy file in OWS: deployment.system.security.policy=file\:///C\:/OWSFiles/myjava.policy.

Post Reply