Friday, January 24, 2014

illegal character

Suddenly started facing following error on my development environment – during my maven build!

[ERROR] MyServiceImpl.java:[1,0] illegal character: \65279

 

The root cause of the issue is that the Java class has BOM(Byte-Order Mark) character and java 1.6 does not compile UTF-8 files having BOM!

 

On windows notepad++ has an option to encode the file to “UTF-8 without BOM” but didn’t find anything handy on linux!

 

Solution:

Simplest possible solution!! – Copy the content of the file to another file and it works!

 

 

No comments:

Post a Comment