0

I am using java -jar -Dfile.encoding="UTF-8 com......, to run my application. i want to run this file encoding(-Dfile.encoding="UTF-8) before my main class is called.i,e initializing this code in static block. I have no idea how to initialize this encoding in static block of java. Please let me know, How to initialize the encoding in static block so that it get set on the command prompt before running my application.

geetha
  • 7
  • 1
  • 5
  • 5
    Possible duplicate of [Setting the default Java character encoding?](http://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding) – WeMakeSoftware Jan 21 '16 at 12:47
  • My Question is to initialise from the static block of the main class. How to do this and does it resolve my problem. – geetha Jan 21 '16 at 13:10

0 Answers0