若依框架导入阿里OSS报错问题解决方案

[INFO] ruoyi-quartz ....................................... FAILURE [ 0.504 s] [INFO] ruoyi-generator .................................... SKIPPED [INFO] ruoyi-admin ........................................ SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.327 s [INFO] Finished at: 2024-08-05T09:31:18+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ruoyi-quartz: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :ruoyi-quartz

 

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ruoyi-common: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR]

1、首先使用终端查看java JDK版本号

java -version

输出结果:

java version "1.8.0_361"

Java(TM) SE Runtime Environment (build 1.8.0_361-b09)

Java HotSpot(TM) 64-Bit Server VM (build 25.361-b09, mixed mode)

javac-version

输出结果:

javac 1.8.0_361

如果
22
大多三方库不兼容,请降级为1.8版本
/usr/libexec/java_home -v your (your = 版本号)

 可以这样配置。统一的写法

在.bash_profile文件内

 .zshrc这里面也配置一下

然后

在终端中,运行 source ~/.bash_profile(或相应的配置文件)来应用更改。

source ~/.zshrc

运行

java -version 和 javac -version 

查看版本是否一致

这样java 就降级了

 

 

 

posted @ 2024-08-05 11:27  木子东晓东  阅读(1)  评论(0编辑  收藏  举报