Tool for checking the source of dependencies on specific Java versions

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

I don't necessarily want to jump over all ClassMismatchErrors and avoid the trial and error method. Let's say I only want to document which parts of the application will not work if they were written for, for example, Java6, and I want to run it in the JDK version 5.

Is there something similar? This time Google did not help, and I did not find any solution here (a rare case :)

+5
source share
2 answers

Animal Sniffer can be useful for this, especially its Maven Plugin .

+3
source

If I understand you correctly, what you describe is not a good idea for me.

, JDK 6 ( -target 1.5), JDK 5 ( Java6- API). . , , , , Java 6, Error.

, , , .

0

All Articles