Eclipse 자바 소스에서 한글 인코딩 빌드 오류

String literal is not properly closed by a double-quote

Syntax error on token "}", delete this token
Syntax error on token ")", { expected
Syntax error on token ",", delete this tokenSyntax error, insert ")" to complete MethodInvocation
Syntax error, insert ";" to complete Statement
Syntax error, insert "}" to complete MethodBody
Syntax error on tokens, delete these tokens

 이클립스에서 빌드중 위와 같은 에러가 발생했습니다.

 관련 소스를 보니 한글이 입력 되어 있는지 깨져 보이네요.

 에러가 발생하는 파일에 마우스 우클릭 -> Properties -> Resource에서 위 그림과 같이 Text file encoding을 MS949에서 UTF-8로 설정하시면 됩니다.

 소스에서도 한글이 잘 보이고 컴파일 에러도 수정 됩니다.

댓글

이 블로그의 인기 게시물

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

goorm IDE에서 node.js 프로젝트로 Hello World Simple Server 만들어 띄워보기

애드센스 수익을 웨스턴 유니온으로 수표대신 현금으로 지급 받아보자.