简体   繁体   English

是否可以自定义 JVM 架构以更改 main() 方法名称?

[英]Is it possible to customize JVM architecture for changing main() method name?

可以使用java虚拟机架构的自定义来更改main()方法的名称吗?

No it is not possible by configuration.不,这是不可能的配置。 The method name and its signature are defined at the language level.方法名称及其签名是在语言级别定义的。 See this section from the Java Language Specification:请参阅 Java 语言规范中的这一部分

The method main must be declared public , static , and void .方法main必须声明为publicstaticvoid It must specify a formal parameter (§8.4.1) whose declared type is array of String .它必须指定一个形式参数(第 8.4.1 节),其声明的类型是String数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM