rescdsk
rescdsk

Reputation: 8905

Check project for use of code introduced in Java 7

On my development machine, I have JDK 1.7 installed, but we are packaging software for use with Java 1.5 and 1.6. It's easy to set the -source and -target options so that the syntax is forced to be a particular version, and the output class is interpretable by a particular VM. But there are other version-isms that are biting me, like the 2-argument constructor AssertionError(String, Throwable) and various other subtle changes.

The one solution I know of is to install every different JDK (1.5, 1.6, 1.7) so that Eclipse can exactly match the execution environment for me. Is there any other way to detect these problems? Bonus points if it's an Eclipse or Maven tool.

Upvotes: 3

Views: 119

Answers (2)

user944849
user944849

Reputation: 14951

How about the Codehaus anmial-sniffer maven plugin? I haven't had reason to try it yet, but thought it looked interesting.

Upvotes: 1

Persimmonium
Persimmonium

Reputation: 15791

does this tool help? It's command line, I have seen people using it to detect java7 being used.

Upvotes: 0

Related Questions