title: JPackage Wrong Version (%JAVA_HOME% set to correct directory)
body: <p>Please help. I'm having issues syncing up my JDK and jpackage versions for creating standalone java programs. The JDK version and the runtime version being included with jpackage are mismatched (JDK16 programs being paired with JDK15 runtimes).</p>
  <p>Typing <code>java -version</code> into the command line, it matches up with the current <code>%JAVA_HOME%</code> environment variable configuration, showing JDK16.0.2 (located at <code>C:\Program Files\Java\jdk-16.0.2</code>). This is working correctly.</p>
  <p>However the problem becomes more apparent when I type <code>jpackage --version</code>, it reports that it's using JDK15.0.1 - which as far as I know, I've never installed and I'm unsure of where it's running from. This is a problem, since I need to be able to build Java16 programs with jpackage. As it is now, this results incompatible runtimes and JAR files.</p>
  <p><a href="https://i.stack.imgur.com/wErkR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wErkR.png" alt="enter image description here" /></a></p>
  <p>I've been googling to no avail. I can't compile my JDK16 programs into installers because it keeps trying to use JDK15.0.1 for the runtime.</p>
  <p>For now, I've managed to bypass this strange and seemingly locked configuration by accessing JDK16's jpackage exe manually this way and adding the commands after:</p>
  <p><code>“C:\Program Files\Java\jdk-16.0.2\bin\jpackage.exe”</code></p>
  <p>Any advice is helpful. Perhaps this temporary workaround will be helpful to anyone else with the same problem down the line.</p>