How to use -jvmopt switch for microgateway.sh script

Hi,
I want to be able to pass jvm options when starting the micro gateway. The documentation refers to -jvmopt or --jvm_opt but I don’t how to format the argument :frowning:

For instance I would like to connect a debugger with

'-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5000

so I tried

$ ./microgateway.sh start -ua delegated -p 4487 -gw http://localhost:7777 -gwu Administrator -gwp manage -apis AppDynamicsTEST --jvm_option '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5000'

and got back

Unrecognized option: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5000
usage: microgateway <action> <options>

Tried removing the ‘-’, escaping etc. etc. in which case it treats it as the main class to run and spits out ‘No Such Class Exception’.

Anyone know the correct syntax ?

regards,
John.

It turns out the issue was my jvm opt was invalid :laughing:

Should have used runjwdp instead. However, you do need to ensure that the argument is quoted and that you don’t specify more than one argument per jvm opt e.g.

$ ./microgateway.sh start -ua delegated -p 4487 -apis AppDynamicsTEST -jvmopt '-Xdebug' -jvmopt '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005'
2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.