[英]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 declaredpublic
,static
, andvoid
.方法main
必须声明为public
、static
和void
。 It must specify a formal parameter (§8.4.1) whose declared type is array ofString
.它必须指定一个形式参数(第 8.4.1 节),其声明的类型是String
数组。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.