How to include a JAR file into benchmarks.jar
Wei-Jun Wang
weijun.wang at oracle.com
Wed Jan 5 04:28:43 UTC 2022
> On Jan 4, 2022, at 11:00 PM, Henri Tremblay <henri.tremblay at gmail.com> wrote:
>
> Can you add it with -cp when running the benchmark?
Yes, I can. I'll need to put both my JAR and benchmarks.jar into -cp and run org.openjdk.jmh.Main.
However, to my understanding, merging other JAR files into the benchmarks.jar file make sure there's no need to load a class elsewhere and thus make the benchmarking more fair.
--Weijun
>
> On Tue, 4 Jan 2022 at 16:47, Wei-Jun Wang <weijun.wang at oracle.com> wrote:
> My JMH project needs a 3rd-party JAR file (not in maven repo) and I can add it as a system scope dependency. It builds fine but the JAR file is not merged into the final benchmarks.jar output. The "Including xxx in the shaded jar" lines do not include it.
>
> Is there a way to include it?
>
> Thanks in advance,
> Weijun
>
More information about the jmh-dev
mailing list