当前位置: 首页 > news >正文

maven编译出错,javac: ��Ч��Ŀ�귢�а�: 17

1、异常信息

javac: ��Ч��Ŀ�귢�а�: 17
�÷�: javac <options> <source files>
-help �����г����ܵ�ѡ��

2、原因

电脑安装了jdk1.8 ,项目编译指定jdk版本为17

解决方案1,修改电脑运行jdk版本

解决方案2,在spring项目pom文件中中指定jdk目录位置

   <build>
        <plugins>  
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <verbose>true</verbose>
                    <fork>true</fork>
                    <executable>C:\ProgramFiles\jdk-17.0.12\bin\javac</executable>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArgs>
                        <arg>-XDignore.symbol.file</arg>
                    </compilerArgs>
                    <fork>true</fork>
                </configuration>
            </plugin>
         </plugins>
    </build>

http://www.dtcms.com/a/35848.html

相关文章:

  • 基于SpringBoot和Leaflet的邻省GDP可视化实战
  • 二叉树的遍历知识点及习题
  • 项目升级Sass版本或升级Element Plus版本遇到的问题
  • 文件包含-session2
  • 函数式编程:概念、特性与应用
  • 运行测试用例
  • c3p0、Druid连接池+工具类 Apache-DbUtils (详解!!!)
  • 使用 DeepSeek + OmniParser v2 + UIAutomation 实现 GUI 应用自动化测试的探索
  • 【C++】 stack和queue以及模拟实现
  • [C语言]动态内存分配详解
  • python与C系列语言的差异总结(2)
  • C++21--红黑树
  • 网络安全实入门| 剖析HTTP慢速攻击(Slowloris)与Nginx防护配置
  • unity学习53:UI的子容器:面板panel
  • VMware17下安装Ubuntu22.04与Docker(附带:1.解决重启后IP重置问题。2.多个虚拟机之间网络通信)
  • 机器学习2-决策树
  • Metal 学习笔记二:3D模型
  • 正则化及其在机器学习中的作用
  • 大模型在术后认知功能障碍预测及临床方案制定中的应用研究
  • Java——内部类
  • 嵌入式Modbus协议面试题及参考答案
  • Deepseek和Grok 3对比:写一段冒泡排序
  • 计算机毕业设计SpringBoot+Vue.js明星周边产品销售网站(源码+文档+PPT+讲解)
  • RTK定位精度 1cm+1ppm 中的ppm是什么意思?
  • 智能硬件-01智能停车场
  • Linux设备驱动开发-中断
  • 特殊回文数的因子
  • 22、《Spring Boot消息队列:RabbitMQ延迟队列与死信队列深度解析》
  • SpringBoot约定大于配置
  • 【AIGC系列】1:自编码器(AutoEncoder, AE)