1 package p; 2 3 import java.util.jar.JarFile; 4 5 public class Main { 6 public int getVersion() { 7 return JarFile.runtimeVersion().major(); 8 } 9 }