Does Jacoco 0.8.7 JAR supports JDK 21 classes

65 views
Skip to first unread message

Mehul Parmar

unread,
Apr 8, 2025, 2:16:39 AMApr 8
to JaCoCo and EclEmma Users
Does Jacoco 0.8.7 JAR supports JDK 21 classes. Do we have a table where you guys maintain backward comparibility of JARs and JDk version.

Marc Hoffmann

unread,
Apr 9, 2025, 4:08:11 PMApr 9
to jac...@googlegroups.com
Dear Mehul,


Here you find for 0.8.7:

  • JaCoCo now officially supports Java 15 and 16 (GitHub #1094#1097#1176).
  • Experimental support for Java 17 class files (GitHub #1132).

JaCoCo 0.8.7 was released in 2021, Java 21 was released 2 years later…

The minimum required Java runtime version for all JaCoCo releases is Java 5. Class files are supported back to Java 1.0.

Regards,
-marc


On 8. Apr 2025, at 08:16, Mehul Parmar <mehulpa...@gmail.com> wrote:

Does Jacoco 0.8.7 JAR supports JDK 21 classes. Do we have a table where you guys maintain backward comparibility of JARs and JDk version.

--
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+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jacoco/e89422fb-8ad3-4b27-ad2b-38c6c255d639n%40googlegroups.com.

Mehul Parmar

unread,
Apr 10, 2025, 1:22:13 AMApr 10
to jac...@googlegroups.com
Hello,
I am little bit confused. Class files are supported back till 1 but for older jacoco versions right? Does it mean 0.8.11 and above will support creating reports from java 21 classes?

Regards
Mehul Kumar Parmar

You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/XABRy87SFJU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jacoco/5AB5D1B1-ADB7-486A-87FC-8EF94281D604%40mountainminds.com.

Marc Hoffmann

unread,
Apr 10, 2025, 1:48:18 AMApr 10
to jac...@googlegroups.com
Exactly!

On 10. Apr 2025, at 07:22, Mehul Parmar <mehulpa...@gmail.com> wrote:



Mehul Parmar

unread,
Apr 10, 2025, 6:13:16 AMApr 10
to JaCoCo and EclEmma Users
I have a JacocoAgent running in server model with Jacoco 0.8.12 JAR in a Testenvironment. The exec created in the Testenv I am downloading through a Java service and trying to generate reports from 0.8.7 Jacoco Jar and JDK 21 classes. Will this setup work and if not where is the issue since exec format has not changed from 0.8.7 to 0.8.12, right?

Marc Hoffmann

unread,
Apr 10, 2025, 10:56:13 AMApr 10
to jac...@googlegroups.com
No, this will not work. JaCoCo 0.8.7 does not support Java 21 class files. Also not for report generation.

On 10. Apr 2025, at 12:13, Mehul Parmar <mehulpa...@gmail.com> wrote:

I have a JacocoAgent running in server model with Jacoco 0.8.12 JAR in a Testenvironment. The exec created in the Testenv I am downloading through a Java service and trying to generate reports from 0.8.7 Jacoco Jar and JDK 21 classes. Will this setup work and if not where is the issue since exec format has not changed from 0.8.7 to 0.8.12, right?

Mehul Parmar

unread,
Apr 10, 2025, 12:41:44 PMApr 10
to JaCoCo and EclEmma Users
Okay so Exec file format has not changed from 0.8.7 to 0.8.12, but since Java 21 version support is required, so that's I will need to upgrade my report generating Jacoco helper classes. In my JAVA microservice, we are not directly using a JAR of 0.8.7 but Classes from jacoco repo for each version(https://github.com/jacoco/jacoco/tree/master/org.jacoco.core/src/org/jacoco/core).

What would be a good to way to upgrade our Java microservice to a new version of Jacoco, instead of importing these Jacoco classes for a new version released every time?



Marc Hoffmann

unread,
Apr 10, 2025, 3:07:41 PMApr 10
to jac...@googlegroups.com
Try to use the JARs we publish on Maven for every release.

Reply all
Reply to author
Forward
0 new messages