I have a problem with the chars of all JTextField on my program (when compiled into JAR). When I run it from Eclipse everything works fine... the problem is when run from the already compiled JAR.
The problem is, when I insert text to JTextField with special character as "Ñandú?" when java extract text from the input that goes with rare characters.
For example: System.out.println( myTextField.getText() );
. That would write in the console: IMAGE
I have tried all kinds of way to switch chars, but when I write again on the console or in the interface reappear rare signs. I've even tried the library Commons Lang 3.1
, but I have not been successful :(
I hope someone knows what to do! The only way to work is inserting -Dfile.encoding=UTF-8
on running the jar file, but that can not be so.
Sorry for the English. Thanks!!!