My code:
class Test{
public static void main(String[]args){
char c = 'П';
System.out.print(c);
}
}
All I want is to display that character on windows cmd (which seems to be over-complicated issue for cmd as I've tried many different ways but could not succeed).
I tried a straightforward way:
javac Test.java
, comiler throws this:Test.java:3: error: unclosed character literal char c = 'П';
I tried
javac -encoding UTF-8 Test.java
. It compiles but the character does not appear in cmd.I tried to save
Test.java
with unicode and typedjavac -encoding UTF-16 Test.java
but the character still does not appear.
Also, I should use plain windows notepad and cmd only. Please help, I am struggling with this issue 2 days :(