I just created a jar file using jdk7. I tried running it but kept getting an error. It turned out it was pointing at a jre6 and not the jre in jdk7. So, I used the following
Isn't it easier to change your java version to you rnew jdk7 by changing the CLASSPATH environment variable? See how here
CLASSPATH