Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095445

[Bundlers] javapackager running with invalid java, when it can be found at PATH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7u6, 8, 8u20, 8u40
    • deploy
    • Tested on:

      Windows 7 x64
      Ubuntu 14.04 x64

      When javapackager is started with just absolute path of it and with incompatible (old) java in PATH, it fails with such an error:

      Exception in thread "main" java.lang.UnsupportedClassVersionError: com/sun/javafx/tools/packager/Main : 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)

      Clearly, this is caused by using incorrect java from PATH.

      Steps to reproduce:
      1) Install, for example, JDK 7 and set up it's executables in the PATH variable
      2) Run "javapackager -version" (for old releases: javafxpackager) from the new release (for instance, JDK 8u20)
      3) Get the error

            shemnon Danno Ferrin (Inactive)
            dginzbur Dmitry Ginzburg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: