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

java command doesn't use inheritence for main method

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.4
    • Not verified

      If class Foo provides a main method, and class Bar extends Foo but does
      not provide a main method, Bar inherits Foo's main.

      This is not recognized by the java command. If one invokes "java Bar"
      it will complain that it cannot find a main method. It should just
      invoke Foo.main.

      This allows people to write a general class that drives subclasses and
      then let the subclass override certain methods. A very nice capability

            fyellinsunw Frank Yellin (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: