How do I start JHiccup programmatically?
JHiccup docs recommends starting JHiccup with 1) javaagent, 2) inject the process id, or 3) start it with a wrapper command.
Is it possible / recommended to run JHiccup in a host application with a simple Java API call?
+3
trunkc
source
to share
1 answer
Possible with just one line of code:
org.jhiccup.HiccupMeter.commonMain(args, false);
args
is an array of String[]
the same arguments you would pass to javaagent or wrapper command.
In fact, all of the recommended ways to launch jHiccup end up with the same call HiccupMeter.commonMain
. You can see this in the source code:
-
premain
javaagent method; -
agentmain
for dynamic attachment; -
main
wrapper method.
+1
apangin
source
to share