[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR: JDK-8328339: Static import prevents source launcher from finding class with main method [v4
From:       Jan Lahoda <jlahoda () openjdk ! org>
Date:       2024-03-21 16:58:24
Message-ID: m_x4-qpq54upVe6m6FzyM7OZxnCwIW5U1eex1Xfc1YY=.9bc5659d-6366-4d88-9f23-52473829c963 () github ! com
[Download RAW message or body]

On Tue, 19 Mar 2024 18:36:43 GMT, Christian Stein <cstein@openjdk.org> wrote:

> > Please review this fix for finding the program class in case the first top-level \
> > type has no main method and the order of type compilation does not match the \
> > order in the source file - for example by a static import statement being \
> > present. 
> > Here's an excerpt from [JEP \
> > 458](https://openjdk.org/jeps/458#Launch-time-semantics-and-operation)'s \
> > "Launch-time semantics and operation" section describing the process:
> > > 5. Determine the launch class of the initial .java file. If the first top level \
> > > class in the initial file declares a standard main method (`public static void \
> > > main(String[])` or other standard main entry points as defined in [JEP \
> > > 463](https://openjdk.org/jeps/463#A-flexible-launch-protocol)), then that class \
> > > is the launch class. Otherwise, if another top level class in the initial file \
> > > declares a standard main method and has same name as the file, that class is \
> > > the launch class. Otherwise, there is no launch class, and the launcher reports \
> > > an error and stops.
> 
> Christian Stein has updated the pull request incrementally with one additional \
> commit since the last revision: 
> Streamline program descriptor factory

Looks sensible.

-------------

Marked as reviewed by jlahoda (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18345#pullrequestreview-1952825965


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic