0

Is there any tool that, given a set of jars (and/or class files, possibly plus java source), reports when any Java bytecode dependencies fail (e.g., missing types, methods, constructors, and/or fields)?

Obviously, a compiler does this for source, but I want it for bytecode.

jdeps seems to only work for class and/or packages, not for class members.

I want this tool to ensure that jars of mine are at least binary signature compatible with multiple versions of third-party jars. I only compile against the newest supported versions of the jars, but if an older version of a jar isn't binary compatible, then I know that it can't work for all code paths in my code. Obviously, binary compatibility doesn't guarantee correctness, but at least it identifies certain incompatibilities.

0

It probably does not do exactly what you want but have a look at bnd.

It does deep byte code inspection to generate metadata for modular (OSGi) jars which may be of use to you. For example its Baselining sounds somewhat similar to what you describe. Perhaps you may extend it or build on top of it to cover your usecase.

| improve this answer | |
  • Thanks for info. I'll look into bnd later. I've appended my use case to the question. – XDR Aug 30 '19 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.