Illegal Character when trying to compile java code

后端 未结 9 827
囚心锁ツ
囚心锁ツ 2020-12-29 03:09

I have a program that allows a user to type java code into a rich text box and then compile it using the java compiler. Whenever I try to compile the code that I have writte

9条回答
  •  -上瘾入骨i
    2020-12-29 04:02

    1. If using an IDE, specify the java file encoding (via the properties panel)
    2. If NOT using an IDE, use an advanced text-editor (I can recommend Notepad++) and set the encoding to "UTF without BOM", or "ANSI", if that suits you.

提交回复
热议问题