Tag Archives: WakeOnLan.java:19:

Javac reports error wakeonlan. Java: 19: error: unmapped character encoding GBK

Problem: javac reports error wakeonlan. Java: 19: error: unmapped character encoding GBK

Reason: the default code of windows is GBK, while the code of java file is UTF-8

resolvent:

    Open the java file with UltraEdit and check the code displayed on the status bar in the lower right corner. Here, confirm that it is UTF-8. Or copy the java file into eclipse, right-click and select properties to view its encoding

    If you confirm that the file code is UTF-8, add the coding parameter during javac compilation:

    javac -encoding UTF-8 WakeOnLan.java