IDEA运行Spark代码异常 -> Error:scalac: IO error while decoding Demo2.scala with UTF-8

Posted Mr.zhou_Zxy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IDEA运行Spark代码异常 -> Error:scalac: IO error while decoding Demo2.scala with UTF-8相关的知识,希望对你有一定的参考价值。

IDEA运行Spark代码异常 -> Error:scalac: IO error while decoding \\Demo2.scala with UTF-8

  • IDEA异常
    在这里插入图片描述
Error:scalac: IO error while decoding E:\\BigData\\bd\\Stage2\\day054\\code\\src\\main\\scala\\com\\zxy\\spark\\core\\Day03\\Demo2.scala with UTF-8
Please try specifying another one using the -encoding option
  • 解决方案

在这里插入图片描述只修改这个Global Encoding后并没有解决所有异常,我估计是因为之前写的代码中,还有得没改成UTF-8编码,所以再次操作
在这里插入图片描述修改到这里之后,就正常得运行了,可以的话,在修改后尽量重启一下IDEA,因为有时候可能修改的设置并没有加载到IDEA中
在这里插入图片描述

以上是关于IDEA运行Spark代码异常 -> Error:scalac: IO error while decoding Demo2.scala with UTF-8的主要内容,如果未能解决你的问题,请参考以下文章

IDEA使用Maven打包Spark项目报错,求大神指点下

IDEA本地运行spark生成数据到hive中出错

IDEA中打包Spark项目提示Error:(16, 48) java: -source 1.5 中不支持 lambda 表达式

Thymeleaf 异常:Exception processing template "index": An error happened during template pars

Spark在IDEA中打jar包

spark模型运行时无法连接摸个excutors异常org.apache.spark.shuffle.FetchFailedException: Failed to connect to xxxx/x