NullPointerException in sun.launcher.LauncherHelper.getMainClassFromJar

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 7
    • Component/s: tools
    • jar
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.7.0"
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      java -jar JarWithNoMainClass.jar

      results in:

      Exception in thread "main" java.lang.NullPointerException
              at sun.launcher.LauncherHelper.getMainClassFromJar(Unknown Source)
              at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      User-friendly error message that explains that the JAR does not specify the class to be executed.

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Assignee:
            Unassigned
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: