zoukankan      html  css  js  c++  java
  • Windows系统下,如何设置maven字符编码

    本地安装maven,查看:maven -v

    mvn -version
    Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
    Maven home: C:\MyProgram\apache-maven-3.8.1\bin\..
    Java version: 1.8.0_281, vendor: Oracle Corporation, runtime: C:\MyProgram\Java\jdk1.8.0_281\jre
    Default locale: zh_CN, platform encoding: GBK
    OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

    如何改为utf-8编码呢?

    添加系统环境变量

    MAVEN_OPTS

    -Xms256m -Xmx512m -Dfile.encoding=UTF-8

    Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
    Maven home: C:\MyProgram\apache-maven-3.8.1\bin\..
    Java version: 1.8.0_281, vendor: Oracle Corporation, runtime: C:\MyProgram\Java\jdk1.8.0_281\jre
    Default locale: zh_CN, platform encoding: UTF-8
    OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

    注意:

    更改环境变量后,要重新打开新的命令行窗口

  • 相关阅读:
    我与solr(二)--导入mysql数据库
    Android 渐变效果
    希尔排序
    插入排序
    选择排序
    冒泡排序法
    QT仿QQ页面
    Colliding Mice
    QTablewidget通过代理实现限制输入
    QT绘制心形图案二
  • 原文地址:https://www.cnblogs.com/joshua317/p/15712663.html
Copyright © 2011-2022 走看看