IDEA报错Error running‘Application‘:Command line is too long的问题
问题背景
IDEA在启动项目时,突然报错:
Error running 'Application':
Command line is too long.Shorten command line for Application or also for Spring Boot default configuration.
解决方案
方案一(当前项目设置)
1 当前项目点击运行下拉框的Edit Configurations

2 点击Environment,选择Shorten command line下拉框,选择classpath file或者JAR manifest,点击OK确认

3 main函数也会出现相同的问题,点开Edit编辑

4 点击Modify options,选择Shorten command line

5 更改为classpath file

方案二(全局设置)
1 由于方案一是当前项目设置,其他项目打开又没有了,所以可以设置全局
点击File→New Projects Settings→Run Configuration Templates for New Projects

2 点击springboot项目,其他跟方案一相同

心得
出现莫名其妙的错误就很蓝瘦
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
聊聊SpringCloud中的Ribbon进行服务调用的问题
SpringCloud-Ribbon是基于Netflix Ribbon实现的一套客户端负载均衡的工具。本文给大家介绍SpringCloud中的Ribbon进行服务调用的问题,感兴趣的朋友跟随小编一起看看吧2022-01-01
ByteArrayOutputStream简介和使用_动力节点Java学院整理
ByteArrayOutputStream 是字节数组输出流。它继承于OutputStream。这篇文章主要介绍了ByteArrayOutputStream简介和使用,需要的朋友可以参考下2017-05-05


最新评论