Is there any way to restrict a java project configured with 1.4 compiler compliance level from using 1.5/1.6 specific API where the system is playing with 1.6 JRE?
Setting only 1.4 compiler compliance level on my project does not warn me from using especially 1.5/1.6 specific java.lang.String
methods.
I would suggest the safest (and perhaps the simplest) way is to compile using a JDK 1.4, and run using a JRE 1.6.