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

Cannot create executable jar with main in unnamed class

XMLWordPrintable

    • jar
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      JEP 445. It was started but not completed: the main goal of organically expanding the program from a small "hello world" in three lines to a large program has not been achieved—it is not possible to create an executable JAR with the new syntax using unnamed class. Only compiling and running simultaneously through java HelloWorld.java. No dependencies, no other classes, nothing.

      Also, considering that to expand the program, you have to move the code from an anonymous class to a named one, it violates another idea of the JEP: not introducing a special Java dialect for newcomers. Right now, it turns out that there is a dialect on which you can write only one file using the standard library, and there is regular Java, where everything is the same as before.


      FREQUENCY : always


            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: