title: Running Java 8 jar when only Java 11 JRE is available
body: <p>I have a third-party executable jar file which I don't have access to the source code of. It was compiled with Java 8 and it uses some javax packages for XML processing. These are in Java EE and have been removed from recent versions of Java SE.</p>
  
  <p>I want to run this third-party jar file on a host machine that I don't have control over. It has Java 11 installed and I'm not allowed to install Java 8 on it.</p>
  
  <p>I've seen <a href="https://stackoverflow.com/a/48204154/638028">this answer</a> which says that the way to solve this issue is to rebuild the application with additional dependencies to replace the Java EE packages that were removed from the Java 11 jre. Unfortunately, I can't use that answer because I don't have access to the source code. Can I instead use a <code>-classpath</code> argument to the <code>java -jar</code> command to solve this?</p>