Error compiling Java file with special characters in class name

后端 未结 2 787
生来不讨喜
生来不讨喜 2021-01-18 04:28

I am encountering an issue compiling a source file with a special character in the class name. The class file compiles fine in the Eclipse IDE, but not from javac. I belie

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-18 04:30

    One solution is to list the file name of each compilation unit in a separate file, say files, and pass @files as a command-line argument to javac. Otherwise, you will have to set the locale of your shell, so that it is using the correct character encoding.

提交回复
热议问题