JDK and JRE supported versions for 4.0.1
What versions of JDK and JRE does Mendix version 4.0.1 actually support?
Take a look at these posts:
JDK 1.7 info and JDK 1.6 info. In other words, anything after JDK 1.6 update 22 should be OK on version 4.x of Mendix