> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/viii.-build-tool-plugins/71.-supporting-other-build-systems/71.3.-finding-a-main-class.md).

# 71.3. 查找main类

如果你没有使用`Repackager.setMainClass()`指定一个main类，该repackager将使用[ASM](http://asm.ow2.org/)去读取class文件，然后尝试查找一个合适的，具有`public static void main(String[] args)`方法的类。如果发现多个候选者，将会抛出异常。
