Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool for checking source for dependencies on specific Java versions

Is there a quick way (e.g. tool) to detect, from the source (or maybe even from compiled classes), which parts of an application call Java API methods that are only implemented in a specific Java version? (e.g. which parts of my app are Java6-specific)

I don't necessarily want to hop through all ClassMismatchErrors and avoid the trial-and-error-method. Let's say I only want to document which parts of an application won't work if they were writte for, e.g., Java6 and I want to run it in a version 5 JDK.

Is there something like this? Google did not help this time, nor did I find any solution here (a rare case indeed:)

like image 693
Gregor Avatar asked Oct 25 '22 12:10

Gregor


1 Answers

The Animal Sniffer might be helpful for this, especially its Maven plugin.

like image 164
Pascal Thivent Avatar answered Nov 08 '22 13:11

Pascal Thivent