scala “error: io error while decoding” “with utf-8”

前端 未结 4 1019
悲&欢浪女
悲&欢浪女 2021-02-12 13:31

this thing keeps coming up I checked that all my source files are utf8 encoded, and Im using \'-encoding UTF8\' flag with both scalac and scala command line tools
any ideas?

4条回答
  •  长发绾君心
    2021-02-12 13:50

    Just to document this, the problem is that the program was being run like this:

    scala filename.class
    

    Instead, it should be run like this:

    scala package.hierarchy.Object
    

    Where Object is the name of an main-containing object that you wish to run.

提交回复
热议问题