Home > Java > JavaBase > body text

java cannot compile

angryTom
Release: 2019-11-15 13:16:31
Original
4474 people have browsed it

java cannot compile

java cannot be compiled

There are many reasons why java cannot be compiled. Here are the common reasons and solutions.

1. javac is not an internal or external command, nor is it an operable program.

The above prompt appears because our java environment variables are not configured properly. The solution is to add jdk directory\bin to the computer system variable Path, and then reopen cmd.

2. Error: Encoding GBK unmappable characters

Such an error occurs because of inconsistent encoding. The solution is to use the editor to Convert the file encoding to ANSI encoding, use javac -encoding GBK fliename.java to specify the encoding format when compiling, or convert the file to utf-8 format, and specify the encoding to utf-8 when compiling .

php Chinese website, a large number of free Java introductory tutorials, welcome to learn online!

The above is the detailed content of java cannot compile. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!