首页 > 其他分享 >使用openjdk17编译时报错:Fatal error compiling: 错误: 不支持发行版本 1.17

使用openjdk17编译时报错:Fatal error compiling: 错误: 不支持发行版本 1.17

时间:2023-11-17 19:11:06浏览次数:34  
标签:INFO 1.17 xdd error pero --- compiling ERROR resources

1.在linux环境下(docker镜像里面)使用如下命令编译打包时报错

mvn clean package -Dmaven.test.skip=true
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< xxx.xxx:pero-xdd >----------------------
[INFO] Building pero-xdd 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ pero-xdd ---
[INFO] Deleting /build/pero-xdd/target
[INFO] 
[INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ pero-xdd ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] Copying 2 resources from src/main/resources to target/classes
[INFO] 
[INFO] --- maven-compiler-plugin:3.11.0:compile (default-compile) @ pero-xdd ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 15 source files with javac [debug release 17] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.359 s
[INFO] Finished at: 2023-11-17T12:18:09+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project pero-xdd: Fatal error compiling: error: release version 17 not supported -> [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

 

2.反复排查,java -version正常,mvn -v正常。最后发现,没有javac命令...也就是说这个基础镜像里没有openjdk-devel的包,最后安装上该包后,可以正常编译

yum install -y java-17-openjdk-devel

 

标签:INFO,1.17,xdd,error,pero,---,compiling,ERROR,resources
From: https://www.cnblogs.com/wdgde/p/17839512.html

相关文章

  • 11.17每日总结2
    Vue-cli中报错Modulenotfound:Error:Can’tresolve‘vue-router’in‘D:\GithubProject\shoppingsystem\shopping-system\src\router’背景配置尚硅谷的尚品汇环境时,报如下错误:出错的代码//配置路由的地方importVuefrom'vue';importVueRouterfrom'vue-router';//......
  • RT-Thread Studio中添加软件包报错ImportError: No module named psutil
    经查,我这里是与RT-ThreadStudio一起的python2.7中没有psutil模块导致的,因此需要在python2.7中安装psutil模块。我这里已经安装了python3.8,于是先将环境变量替代为RT-ThreadStudio一起的python2.7(方便下面的命令行执行):然后安装psutil模块:然后就好了: ......
  • 2023.11.17——每日总结
    学习所花时间(包括上课):9h代码量(行):0行博客量(篇):1篇今天,上午学习,下午学习;我了解到的知识点:1.mybatis2.flash明日计划:学习......
  • ERROR: Permission to stevenlong123/test.git denied to smith-bing. fatal: Could n
    第一次练习git提交代码到github时出现的错误。这里就是说github服务器拒接了我们,不支持远程连接。发现是因为我使用的是ssh来提交的,ssh是安全连接需要通信双方各有一对公钥私钥,github服务器不会自动交换公钥,需要手动在github存储库中部署自己电脑的公钥。使用git命令“ls-al~/.s......
  • 11.17打卡
    1.分割链表(86)给你一个链表的头节点 head 和一个特定值 x ,请你对链表进行分隔,使得所有 小于 x 的节点都出现在 大于或等于 x 的节点之前。你应当 保留 两个分区中每个节点的初始相对位置思想:双链表存储/***Definitionforsingly-linkedlist.*publicclas......
  • Windows Live Writer Connect BlogEngine – Error Found
    Anerroroccurredwhileattemptingtoconnecttoyourblog:networkconnectionError-ErrorAttemptingtoconnecttoblogat:http://website.comfound:foundyoumustcorrectthiserrorbeforeproceeding.Discuss:http://social.microsoft.com/Forums/en-U......
  • 出现UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbc in position 2: inva
    直接在代码第一行写下这段代码#-*-coding:utf-8-*-为什么这个有注释符号还是可以起作用?在Python中,`#-*-coding:utf-8-*-`这行代码并不是注释,而是一个特殊的声明,称为“编码声明”(encodingdeclaration)。它告诉Python解释器在载入源文件时使用UTF-8编码来解析源......
  • 如何解决AttributeError: 'DictVectorizer' object has no attribute 'get_feature_na
    这个错误通常是因为 DictVectorizer 对象没有 get_feature_names 属性。这可能是因为你使用的 sklearn 版本过低,或者是因为你没有正确地导入 DictVectorizer 类。要解决这个问题,你可以尝试升级 sklearn 版本,或者使用以下代码导入 DictVectorizer 类:fromsklearn.f......
  • 无GPU环境中运行出错解决方法:AssertionError: Torch not compiled with CUDA enabled
    在執行pytorch代碼的時候,突然看到報錯AssertionError:TorchnotcompiledwithCUDAenabled這說明了1.你pytoch确实安装了2.你安装的是cpu版本作为验证,你可以在python编辑器输入下列代码如果要在无GPU环境中运行,需要进行一些修改。1. 情况一:将出现‘gpu:0’的地方......
  • mac 下使用 brew 安装包报错 error: Cannot install under Rosetta 2 in ARM default
    mac下使用brew安装包报错error:CannotinstallunderRosetta2inARMdefaultprefix(/opt/homebrew)!TorerununderARMuse:arch-arm64brewinstall...Toinstallunderx86_64,installHomebrewinto/usr/local.解决办法:arch-arm64brewinstallxxx......