1、IDEA 设置启动JDK
在使用 idea16版本时,如果系统jdk不是 JDK8或更高,启动时会弹出如下错误:
Window 可以添加IDEA_JDK环境变量(64位启动程序)指定启动使用的JDK:
IDEA_JDK_64 = D:\Program Files\Java\jdk1.8.0_72
根据不同IDE可以选择的变量有:IDEA_JDK / PHPSTORM_JDK / WEBIDE_JDK / PYCHARM_JDK / RUBYMINE_JDK / CLION_JDK / DATAGRIP_JDK
2、最大文件size设置
IDEA打开的文件大小太大会提示报错:
File size exceeds configured limit (2560000). Code insight features not available.
IDEA对能关联的文件大小做了限制,主要是为了保护内存,默认值为2500kb,对于一般的java文件也够用了,只是用到protocbuf生成的java文件过大,达到3M多。 其设置在...IDEA安装目录\bin 下的idea.properties文件。
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
解决方法:根据自己需要调整此数值,单位KB
3、设置IDEA运行JVM内存
其设置在...IDEA安装目录\bin 下的idea.exe.vmoptions | idea64.exe.vmoptions,根据机器内存调整:
-Xms128m
-Xmx3072m
-XX:MaxPermSize=512m