<AWT Dev> Integrated: 8261785: Calling "main" method in anonymous nested class crashes the JVM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

<AWT Dev> Integrated: 8261785: Calling "main" method in anonymous nested class crashes the JVM

Henry Jen-2
On Sun, 14 Mar 2021 23:34:55 GMT, Henry Jen <[hidden email]> wrote:

> This patch ensure launcher won't crash JVM for the new static Methods from local/anonymous class on MacOS.
>
> As @dholmes-ora pointed out in the analysis, this is a MacOS specific bug when the launcher trying to grab class name to be displayed as the Application name on the menu.
>
> The fix is to not setting name, test shows that GUI java application shows 'bin' as the application name. It's possible for us to set the name to something more friendly, for example, "Java", but I am not sure that should be launcher's responsibility to choose such a default name. It seems to me the consumer of the JAVA_MAIN_CLASS_%d environment variable should be responsible to pick such name in case the environment variable is not set.

This pull request has now been integrated.

Changeset: b2df5137
Author:    Henry Jen <[hidden email]>
URL:       https://git.openjdk.java.net/jdk/commit/b2df5137
Stats:     143 lines in 3 files changed: 142 ins; 0 del; 1 mod

8261785: Calling "main" method in anonymous nested class crashes the JVM

Reviewed-by: serb

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

PR: https://git.openjdk.java.net/jdk/pull/2999