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

Improve UnsupportedClassVersionError message

XMLWordPrintable

    • b04

        A DESCRIPTION OF THE REQUEST :
        I tried to run a jar file and got this crash message: Exception in thread " main " java.lang.UnsupportedClassVersionError: com/ka/excelcmp/ExcelCompare : Unsupported major.minor version 51.0.

          To an ordinary user, such a crash would directly lead to giving up.

        Instead, the message should communicate the fact that I tried to run a program that required a version of Java that was incompatible because it was at least one major revision later than the version that is installed.

        JUSTIFICATION :
        This is an exception that is seen by end users and therefore it should tell them what they need to know, either in English or with a URL to a web page that explains the problem.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        Best would be for every exception message to include a URL to a page that first explains what it might mean to an end user, and then farther down the page explains what it might mean to a programmer, including a link to the exception in the API documentation.
        ACTUAL -
         " Unsupported major.minor version 51.0 " , which is incomprehensible to an end user

              ctornqvi Christian Tornqvist
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: