jar.exe does not return an error code when it fails

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.3.0
    • Component/s: tools
    • jar
    • beta2
    • x86
    • windows_2000
    • Verified



      Name: bsC130419 Date: 05/23/2001


      java version "1.3.0_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
      Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)

      you can easily reproduce this bug on win2k:

      C:\>jar cf0 MyJarFile.jar AClassFileThatDoesNotExist.jar
      AClassFileThatDoesNotExist.jar : no such file or directory

      C:\>echo %ERRORLEVEL%
      0


      any MAKE utility uses the error code returned by programs to check if the
      command succeeded or failed. jar.exe *should* set ERRORLEVEL (return a code
      different to 0) when it fails, and not just display an error message - this is
      no use in a makefile, even though you know something went wrong.
      (Review ID: 124762)
      ======================================================================

            Assignee:
            Konstantin Kladko (Inactive)
            Reporter:
            Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: