IDEA——》解决Command line is too long

推荐链接:
    总结——》【Java】
    总结——》【Mysql】
    总结——》【Redis】
    总结——》【Kafka】
    总结——》【Spring】
    总结——》【SpringBoot】
    总结——》【MyBatis、MyBatis-Plus】
    总结——》【Linux】
    总结——》【MongoDB】
    总结——》【Elasticsearch】

1、操作

Debug启动@Test方法

2、现象(错误信息)

在这里插入图片描述

Error running EsfRegionTest.getEsfRegionByParam. Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun.

3、原因

命令行太长

4、解决

方案1:修改文件.idea/workspace.xml

1)找到项目下的.idea/workspace.xml
2)打开文件,找到标签:PropertiesComponent
3)添加一行属性:

<component name="PropertiesComponent">
    其它属性代码不要修改,只添加下面一行属性代码
    <property name="dynamic.classpath" value="true" />
</component>

在这里插入图片描述

在这里插入图片描述

方案2:修改参数Shorten command line

1)点击菜单栏Run——>Edit Configurations
2)点击Modify options——>Shorten command line,显示出Shortn command line参数(默认值为noe)
3)点击Shorten command line下拉框——>改为JAR manifest 或 classpath file

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

评论 21
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值