Avoid character code error in java when using VScode extension RUN-CODE

What do you want to do

I am using an extension called Code Runner to easily compile and run with VScode. If you run a java program created with VScode on MAC with VScode on another OS, an error due to the character code will occur, so the setting to solve it is described. The trendy Coder seems to work.

Settings

I will set the character code individually. (Here, UTF-8)

    "code-runner.executorMap": {
    "java": "cd $dir && javac -encoding UTF-8 $fileName && java  -Dfile.encoding=UTF8 $fileNameWithoutExt"
    }

Related information

https://westhillworker.com/visualstudiocode-cpp/

Recommended Posts

Avoid character code error in java when using VScode extension RUN-CODE
Avoid Yubaba's error in Java
Differences in code when using the length system in Java
Guess the character code in Java
How to solve the unknown error when using slf4j in Java
Java character code
Try using Sourcetrail (win version) in Java code
When using a list in Java, java.awt.List comes out and an error occurs
Error when using SnapKit
Resolve CreateProcess error = 206 when running Java in a Windows environment
Create QR code for Google Authenticator using ZXing in Java
Things to be aware of when writing code in Java
Correct the character code in Java and read from the URL
Show detailed error in Logger when running Java on server
Talk about using Java input wait (Scanner) in VS Code
Try using RocksDB in Java
Java in Visual Studio Code
Error when using rails capybara
Symbol not found error when new class in another Java file
Unknown error in line 1 of pom.xml when using Spring Boot in Eclipse
Precautions when using checkboxes in Thymeleaf
Java Spring environment in vs Code
Encrypt using RSA cryptography in Java
[Java] Boilerplate code elimination using Lombok
Unexpected exception when using Java DateTimeFormatter
[Java] Boilerplate code elimination using Lombok 2
HTTPS connection using tls1.2 in Java 6
I tried using JWT in Java
Sample code using Minio from Java
Bad habits pointed out in code reviews when Java was a beginner
[Visual Studio Code] I get a syntax error when debugging when using rbenv
Return value when using Java No. 1 Optional.ifPresent that was useful in business