Hi,

there is a couple of reasons why we need to rename the runtime package, some 
are described here: https://www.jacoco.org/jacoco/trunk/doc/implementation.html

I see two options:

1) Use the JaCoCo build where the instrumentation and the runtime package use 
the same generated package name (which is derived from the Git commit id)
2) Also build your own jacococli.jar

Out of curiosity: Why do you need to build your own jacocoagent.jar in the 
first place?

Regards,
-marc  



> On 29. Oct 2024, at 01:47, homejim he <homejim...@gmail.com> wrote:
> 
> I have packaged my own jacocoagent.jar. After packaging, the package name for 
> the internal package is org.jacoco.agent.rt.internal instead of the official 
> org.jacoco.agent.rt.internal_aeaf9ab.
> 
> I have a scenario where I use Arthas to perform retransform, so I used the 
> official jacococli.jar for offline instrumentation. However, after 
> instrumentation, the introduced package is 
> org.jacoco.agent.rt.internal_aeaf9ab instead of org.jacoco.agent.rt.internal, 
> which results in a NoClassDefFoundError or ClassNotFoundException for the 
> class org.jacoco.agent[...]Offline.
> 
> I also checked the similar issue in the JaCoCo FAQ 
> https://www.jacoco.org/jacoco/trunk/doc/faq.html, but it does not address my 
> specific problem.
> 
> How can I handle this situation? How can I ensure that the fully qualified 
> name of the Offline class introduced by offline instrumentation is 
> org.jacoco.agent.rt.internal.Offline instead of 
> org.jacoco.agent.rt.internal_aeaf9ab.Offline?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jacoco+unsubscr...@googlegroups.com 
> <mailto:jacoco+unsubscr...@googlegroups.com>.
> To view this discussion visit 
> https://groups.google.com/d/msgid/jacoco/c1cb6e2a-ab4d-4a80-a529-0b9419b20407n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/c1cb6e2a-ab4d-4a80-a529-0b9419b20407n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/jacoco/900FE619-941C-4593-B99E-9599ACEB5512%40mountainminds.com.

Reply via email to