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

REGRESSION: java launcher does not recognize format of appended JAR file

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b43
    • CPU:
      x86
    • OS:
      windows_2000

      Description



      Name: rl43681 Date: 02/20/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b32, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows 2000 [Version 5.00.2195]

      A DESCRIPTION OF THE PROBLEM :
      In all previous versions of the JRE, it was possible to append a JAR file to the end of the standard Java launcher executable and reference the resulting executable as a valid JAR file. For example,

      jar -cf application.jar ...
      copy /b java.exe+application.jar application.exe
      java -classpath application.exe ...

      In JDK 1.5, this does not appear to work any longer. Indeed, this message is printed:

          Invalid or corrupt jarfile C:\TEMP\application.exe

      This is a severe limitation and renders some of our existing code nonfunctional after upgrading to JDK 1.5.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1) Create a hello-world java test class.
      2) Create a manifest with the class from (1) as the Main-Class.
      3) Create a JAR (application.jar) containing the class from (1) and the manifest from (2).
      4) Execute this command: copy /b %JAVA_HOME%\bin\java.exe+application.jar application.exe.
      5) Execute this command: application.exe -jar application.exe.

      EXPECTED VERSUS ACTUAL BEHAVIOR :ls

      EXPECTED -
      The hello-world test class should run.
      ACTUAL -
      This message is printed:

          Invalid or corrupt jarfile C:\TEMP\application.exe

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Invalid or corrupt jarfile C:\TEMP\application.exe

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      -- Test.java
      public class Test {
      public static void main(String[] arguments) {
      System.err.println("Hello, world.");
      }
      }

      -- MANIFEST.MF
      Manifest-Version: 1.0
      Main-Class: Test
      ---------- END SOURCE ----------

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Incident Review ID: 239647)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            jkowalsksunw Joseph Kowalski (Inactive)
            Reporter:
            rlewis Roger Lewis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: