This may be due to insufficient permanent generation or metaspace of memory. You can solve this problem by adding "-XX:MaxPermSize" (-XX:MaxPermSize=) and "-XX:MetaspaceSize" (-XX:MetaspaceSize=) , or you can allocate a little more memory. In addition, if your computer memory is too small, please increase the computer memory or use Eclipse instead.