IDEA 常量字符串过长问题

时间:2024-03-14 11:19:54

在编译项目时,出现错误为:“常量字符串过长” ,在网上先找到解决办法。 

错误如下:

IDEA 常量字符串过长问题
办法如下: 
File >> Settings >> Build,Execution,Deployment >> Compiler >>Java Compiler 

将 Use compiler 改为 Eclipse 即可;

如图:

IDEA 常量字符串过长问题

附: 如果没有解决的话,去查看一下 tomcat 的 VM options 有没有设置; 
在这里提供一个参数值:

-Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m