Hello bndtool-ers,
I have created a small java console app that I want to have users install via jpm. So when jpm installs the command (at least on linux) it adds a shell script like this:
exec "java" -Dpid=$$ -DJPMREPO=/var/jpm/repo -cp "/var/jpm/repo/3AB5ADA7F0987D31237EB2A52B5C1191EB500716:/var/jpm/repo/service.jar" aQute.bnd.main.bnd "$@"
However, for my little java app I would like for it to be able to use the JDK Attach API, which requires tools.jar from the jdk to be on the classpath. So here is my proposal... what if when using the "jpm" command, it supported an additional argument named "-t or --tools" that would generate that same shell script but instead do it like this:
exec "java" -Dpid=$$ -DJPMREPO=/var/jpm/repo -cp "/var/jpm/repo/3AB5ADA7F0987D31237EB2A52B5C1191EB500716:/var/jpm/repo/service.jar:/path/to/jdk_home/lib/tools.jar" aQute.bnd.main.bnd "$@"
This all assuming that the jpm command itself can find a tools.jar in the current java.home dir at runtime. Of course I am willing to contribute this feature to jpm if it would be of interest, but before I work on a PR, I wanted to get some feedback from jpm maintainers.
Thanks for your time.