Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use -encoding option to compile a UTF-8 java source file

843810Feb 27 2002 — edited Jun 27 2002
I used
javac -encoding UTF-8 javafile.java

to compile the java source file "javafile.java" which is saved by UTF-8. But got errors.

Although when I save the file "javafie.java" as ANSI file, and used
javac javafile.java

I got success.

May I get some helps for compiling the UTF-8 java file???
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2002
Added on Feb 27 2002
3 comments
797 views