Jcov: Can JCov provide test/coverage reports for Native Java classes eg java.lang.String?
Alexey Fedorchenko
alexey.fedorchenko at oracle.com
Fri Feb 9 07:50:44 UTC 2018
Hello!
JCov works with java bytecode and your example should be possible for the java.lang.String class file.
You will need to change JCov build to produce custom binaries version for the 1.4 JDK.
(you need to compile jcov_network_saver.jar/jcov_file_saver.jar for the correct target. for the JDK5
it is simply changing the target in the build.xml for savers jars, for the 1.4 - small changes will be required
in savers’ source code).
—Alexey
> On Feb 8, 2018, at 4:17 PM, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
>
> Jeffrey,
>
> JCov cannot instrument native code,
>
> -- Jon
>
>
> On 2/8/18 2:12 AM, dalibor topic wrote:
>> Hi Jeffrey,
>>
>> The JCov tool is part of the Code Tools Project. As indicated on http://openjdk.java.net/projects/code-tools/ the mailing list for that tool is jcov-dev [0].
>>
>> I have bcc:ed members@ and forwarded your e-mail to jcov-dev@ - please subscribe at [0] in order to be able to follow the thread and reply.
>>
>> cheers,
>> dalibor topic
>>
>> [0] http://mail.openjdk.java.net/mailman/listinfo/jcov-dev
>>
>> On 08.02.2018 06:43, HAWKER JEFFREY wrote:
>>> To: JDK Tools Members,
>>> I would greatly appreciate your thoughts on this:
>>> Can JCov provide test/coverage reports for Native Java classes eg java.lang.String?
>>> I wanted to demonstrate the effectiveness of JCov to a Japanese audience by generating a coverage report on Native Classes, for example java.lang.String. In other words, a way to generate coverage reports on Junit test classes for Native Java Class. Is that possible?
>>> I also want to do this on Java1.4 using Junit3 and Java8 using Junit4 and then compare coverage reports. From the online documentation I am a little confused if Java1.4 is supported:
>>> https://wiki.openjdk.java.net/display/CodeTools/How+To+Build+JCov Requirements: JDK version 5.0
>>> https://wiki.openjdk.java.net/display/CodeTools/jcov JCov supports applications on JDK 1.0 and higher (including JDK 8)
>>> I am struggling to find a coverage tool that can accomplish this. Is JCov the potential tool?
>>> I would really appreciate any response that can help me move forward.
>>> Many thanks in advance,
>>> Jeff
>>>
>>
>
More information about the jcov-dev
mailing list