This will do it:
import org.springframework.core.SpringVersion;
public class VersionChecker
{
public static void main(String [] args)
{
System.out.println("version: " + SpringVersion.getVersion());
}
}
Compile and run this with spring.jar in your CLASSPATH and it’ll display the version for you. See the javadocs as well.