title: How to specify slave.jar compatible jdk version in Jenkins
body: <p>My maven project have a hard dependency on jdk1.7.
  I have Jenkins(2.89.4) instance which has jdk 1.8.
  When I try to connect to slave which(specifying jdk 1.7 in this slave config), launch agent is failing with error below </p>
  
  <pre><code>   Starting slave process: cd "/jenkins" &amp;&amp; /opt/jdk1.7.0_80/bin/java  -jar slave.jar
  Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher : Unsupported major.minor version 52.0
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
          at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
          at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
      Slave JVM has terminated. Exit code=1
  </code></pre>
  
  <p>Launch agent is successful if this slave has JDK 1.8 installed. But, in this case, my maven build is failing as my maven project have a hard dependency on JDK 1.7.</p>
  
  <p>I was wondering if there is a way to specify slave.jar which is compatible with jdk 1.7 in Jenkins instance </p>