Closed maxandersen closed 1 year ago
Hmm. How did you install it?
I think you hit the issue that someone (not me) submitted a bad formula to the main brew repo. Make sure to use one of the installs documented at jbang.dev/downloads
I used brew, but now I used the sdkman
version, but after installing, the javaagent still did not work:
> java -javaagent:ap-loader@jvm-profiling-tools/ap-loader=start,event=cpu,file=profile.html -jar ~/Downloads/ap-loader-2.8.3-all.jar
Error opening zip file or JAR manifest missing : ap-loader@jvm-profiling-tools/ap-loader
Error occurred during initialization of VM
agent library failed to init: instrument
Any ideas? Being able to use ap-loader
directly is really cool.
you need to follow the docs and use jbang
not java
:)
This should do it:
jbang --javaagent:ap-loader@jvm-profiling-tools/ap-loader=start,event=cpu,file=profile.html ~/Downloads/ap-loader-2.8.3-all.jar
I will merge it and modify the text afterward to fix the other issues I pointed out myself.
here is a readme documenting how to use ap-loader jbang alias.
I would still encourage to create jvm-profilng-tools/jbang-catalog then instead of:
jbang ap-loader@jvm-profiling-tools/ap-loader
it would just bejbang ap-laoder@jvm-profiling-tools
.But anyhow - here is the doc for how it works with the alias inside the main repo.