Home  >  Article  >  Java  >  Introduction to solutions to Java compilation garbled code

Introduction to solutions to Java compilation garbled code

尚
Original
2019-12-02 10:14:213004browse

Introduction to solutions to Java compilation garbled code

Use cmd to debug the java syntax and encounter the following problems: (Recommended: java video tutorial)

Puppy.java:3: Error : Encoding GBK unmappable characters (0x80)

Introduction to solutions to Java compilation garbled code

Solution:

1. Use the javac -encoding utf-8 command instead of javac when compiling, but This must be done every time you compile

2. Find the path: Control Panel - System and Security - System - Advanced System Settings - Environment Variables - System Variables. Add a new JAVA_TOOL_OPTIONS with the value "-Dfile.encoding=UTF-8".

Introduction to solutions to Java compilation garbled code

For more java knowledge, please pay attention to the java basic tutorial column.

The above is the detailed content of Introduction to solutions to Java compilation garbled code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn