赞
踩
IDEA启动springboot项目,提示java: java.lang.IllegalArgumentException,没有多余的信息,百度之后都是让修改idea的Java compiler,但是我全都设置的Java8,所以没头绪。
谷歌搜了一下,发现Jetbrains的官网有人提这个问题,大致浏览了下,描述和我的问题一致。再看描述产生这个问题的条件:简单描述下,就是IDEA 2020.3版本会复现这个问题,如果升级到2020.4就没有该问题,而且后面的添加提问是说2020.3.1.RC版本也会有这个问题。
链接在这儿:https://youtrack.jetbrains.com/issue/IDEA-256707
What steps will reproduce the issue?
1. Upgrade to 2020.3 invalidate caches and restart
2. Build Project (Ctlr+F9)
3. Build output shows java: java.lang.IllegalArgumentException without any clue what's wrong // 注意这一句,这个IllegalArgumentException和其他的不同,所以百度搜到的解决方法不能解决该问题
4. Downgrade to 2020.2.4 invalidate caches and restart
5. Build Project (Ctrl+F9)
6. Build succeeds
java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
Stack trace:
2020-12-02 18:03:52,635 [ 4497] INFO - s.incremental.java.JavaBuilder - java.lang.IllegalArgumentException
java.lang.RuntimeException: java.lang.IllegalArgumentException
at com.sun.tools.javac.main.Main.compile(Main.java:553)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:231)
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:498)
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:350)
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:274)
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:228)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1441)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1100)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1224)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1066)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:832)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:419)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:183)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:132)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:132)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:219)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
-Djps.track.ap.dependencies=false
截图如下
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。