博客
关于我
启动项目乱码
阅读量:796 次
发布时间:2019-03-24

本文共 1063 字,大约阅读时间需要 3 分钟。

如何解决IDEA显示字体异常或语言缺失的问题

当你在IDEA中遇到字体显示异常或语言缺失的情况时,可以按照以下步骤进行配置和解决:

方法一:设置VM选项

  • 启动IDEA前修改VM选项

    • 打开IDEA的"VM设置"(Windows→Preferences→ ValueType MB翻译缺失时请参考故障排除步骤)
    • 点击右侧的框框,选择"Parameters",点击右侧的框框选择"More"。
    • 输入参数:-Dfile.encoding=UTF-8,然后点击"Apply and OK"。
  • 验证配置

    • 重新启动IDEA,确保VM选项已正确设置。

  • 方法二:服务器环境配置

  • 安装支持UTF-8的字体

    • 确保系统上已安装TrueType字体("MingLiU smoothly"或"SimSun 100"等常用简体字体)。
  • 配置IDEA编码设置

    • 进入IDEA设置,找到"Editor"→"Language Setting"→"Java"。
    • 建立vmoptions文件,设置编码为UTF-8。
    • 如果你是在Windows环境下,可以在IDEA安装目录下创建idea.exe.vmoptions文件,内容如下:
    -Dfile.encoding=UTF-8
  • 重启IDEA并重新编译

    • 保存之后重启IDEA,确保编码设置生效。

  • 方法三:Tomcat多环境配置

  • Tomcat UTF-8支持配置

    • 修改Tomcat配置文件(conf/Catalina/VERSION.conf),添加如下内容:
    Connector port="8080" URI="http://localhost:8080" 名称="Tomcat" bound=true Tome connections=50 connectionTimeout=600oolbar_ALLOW_ALL true />
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3
    IE 10Catalina
  • 启动Tomcat服务

    • 运行catalina.bat,选择默认启动选项。
  • 检查访问日志

    • 在Tomcat管理界面查看访问日志,确认显示正确的UTF-8编码。

  • 通过以上方法,你可以解决IDEA显示字体异常或语言缺失问题,确保开发环境正常运行。

    需要注意的是环境配置的稳定性,请记录好所有更改并进行备份。

    转载地址:http://sgqkk.baihongyu.com/

    你可能感兴趣的文章
    npm ERR! Unexpected end of JSON input while parsing near '...on":"0.10.3","direc to'
    查看>>
    npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp
    查看>>
    npm error Missing script: “server“npm errornpm error Did you mean this?npm error npm run serve
    查看>>
    npm error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装
    查看>>
    npm install CERT_HAS_EXPIRED解决方法
    查看>>
    npm install digital envelope routines::unsupported解决方法
    查看>>
    npm install 卡着不动的解决方法
    查看>>
    npm install 报错 EEXIST File exists 的解决方法
    查看>>
    npm install 报错 ERR_SOCKET_TIMEOUT 的解决方法
    查看>>
    npm install 报错 Failed to connect to github.com port 443 的解决方法
    查看>>
    npm install 报错 fatal: unable to connect to github.com 的解决方法
    查看>>
    npm install 报错 no such file or directory 的解决方法
    查看>>
    npm install 权限问题
    查看>>
    npm install报错,证书验证失败unable to get local issuer certificate
    查看>>
    npm install无法生成node_modules的解决方法
    查看>>
    npm install的--save和--save-dev使用说明
    查看>>
    npm node pm2相关问题
    查看>>
    npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
    查看>>
    npm run build报Cannot find module错误的解决方法
    查看>>
    npm run build部署到云服务器中的Nginx(图文配置)
    查看>>