IntellIJ idea打包报错:javadoc生成文档时报错java.lang.IllegalArgumentException解决方案

时间:2024-04-02 09:27:32

报错部分信息如下:

    at com.sun.tools.javadoc.Main.execute(Main.java:64)
    at com.sun.tools.javadoc.Main.main(Main.java:54)
javadoc: ???? - java.lang.IllegalArgumentException

Command line was: "C:\Program Files\Java\jdk1.8.0_74\jre\..\bin\javadoc.exe" @options @packages

Refer to the generated Javadoc files in 'D:\Bigdata-Drools-platform\SSO-SpringCloud\SSO-Search-Dubbo-Service\SSO-SpringCloud-Dubbo\SSO-Search-Dubbo-Nacos-api\target\apidocs' dir.

org.apache.maven.reporting.MavenReportException: 
Exit code: 1 - java.lang.IllegalArgumentException
    at sun.net.www.ParseUtil.decode(ParseUtil.java:202)
    at sun.misc.URLClassPath$FileLoader.<init>(URLClassPath.java:1204)
    at sun.misc.URLClassPath$3.run(URLClassPath.java:525)

解决方案:

把java环境变量配置:

CLASSPATH: %JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar  

更改为CLASSPATH:  C:\Program Files\Java\jdk1.8.0_74\lib;C:\Program Files\Java\jdk1.8.0_74\lib\tools.jar;

IntellIJ idea打包报错:javadoc生成文档时报错java.lang.IllegalArgumentException解决方案

重启IntelliJ Idea即可