0

I am using the javac with command prompt to compile my .java to .class. This is for minecraft if it helps...

Here are the errors I am receiving :

C:\java\eh.java:269: unclosed character literal
/* 284  */    char c = '─Æ';
                   ^
C:\java\eh.java:269: illegal character: \8217
/* 284  */    char c = '─Æ';
                     ^
C:\java\eh.java:269: unclosed character literal
/* 284  */    char c = '─Æ';
                      ^
3 errors

This is the error code line in eclipse :

/* 284  */    char c = 'Ä’'; 

Any help is greatly appreciated! I can't seem to find an answer anywhere!

Dave L.
  • 9,595
  • 7
  • 43
  • 69
Connell
  • 11
  • 3

3 Answers3

1
javac -encoding UTF-8 ...

That probably is a multibyte character, interpreted as ISO-8859-1 as two characters.

Joop Eggen
  • 107,315
  • 7
  • 83
  • 138
0

You are on Windows right?

Add the following argument to your usage of javac:

-encoding UTF-8
Dave L.
  • 9,595
  • 7
  • 43
  • 69
0

Looks like you have two characters in one expression. If you changed to strings rather than characters it might compile. However, some of your characters aren't ASCII characters so you might have to use unicode escape sequences like '\u0061' to get it to compile.

chubbsondubs
  • 37,646
  • 24
  • 106
  • 138