giltene / jHiccup

jHiccup is a non-intrusive instrumentation tool that logs and records platform "hiccups" - including the JVM stalls that often happen when Java applications are executed and/or any OS or hardware platform noise that may cause the running application to not be continuously runnable.
Other
677 stars 92 forks source link

Wrapper doesn't work as documented #3

Closed scotte closed 10 years ago

scotte commented 10 years ago

The wrapper script example of:

jHiccup /usr/bin/java -jar MyProgram.jar -a -b -c

Doesn't work. The only way this works is if options are given to jHiccup.

For example:

$ jHiccup java -version Error: launched with the following args:

Which was parsed as an error, indicated by the following exception: java.lang.Exception: Invalid args: [...]

But this works:

$ jHiccup -d 0 java -version

Looks like a bug in the option parsing where options are not, in fact, optional.

giltene commented 10 years ago

Thanks. Problem was in argsString breakdown (for empty non-null string case) in agentMain(). Fixed with https://github.com/giltene/jHiccup/commit/e5b96bcad9401c4c1620d070cb3893e3167d8fce Will show up in next release (presumably 1.3.8).

scotte commented 10 years ago

Thanks!