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

jar file is not functional using target 16

XMLWordPrintable

    • generic
    • generic
    • Verified

      A DESCRIPTION OF THE PROBLEM :

      The JDK 1.5 compiled package can be executed on new versions of JDK 1.8 - JDK 15. However, the package compiled using JDK 1.6 (and above) creates a jar file that cannot be used for reading such files.

      Discussed on reddit:
      https://www.reddit.com/r/java/comments/lid72i/jdk_15_target_option_will_be_gone_is_it_good/

      The only way to create a functional jar file is to use -target=1.5 (for running on JDK 16). Any other target fails at runtime.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      https://github.com/chekanov/RootIOreader

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      End of reading file
      ACTUAL -
      Exception in thread "main" java.lang.ClassFormatError: LineNumberTable attribute has wrong length in class file hep/io/root/proxy/TString
           [java] at java.base/java.lang.ClassLoader.defineClass1(Native Method)

      ---------- BEGIN SOURCE ----------
      https://github.com/chekanov/RootIOreader
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Not known. It is possible that the option to switch off stack frames can help.

      FREQUENCY : always


            lancea Lance Andersen
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: