I have created an application which retrieves SMS from database and send it over SMPP using JSMPP. When I run it from IDE (Intellij Idea) it delivers the SMS correctly to cell phone but when I create Jar of it and than run it as a window service than the SMS is not correctly encoded. My question is, are there any certain JVM parameters that I should pass to while creating Jar ?
Asked
Active
Viewed 452 times
-1
-
Locale or charset. If the problem is encoding, why don't you post the code for encoding? – Meo May 16 '14 at 15:40
-
because its working fine as for as I run the code from IDE but not working when I run the Jar. – Sikander May 16 '14 at 15:44
-
Then the code is not fine. – Meo May 16 '14 at 15:45
1 Answers
0
I found the solution. I must run the Jar by passing an encoding parameter to JVM.
java -Dfile.encoding=UTF-8 -jar myJarName.jar

Sikander
- 834
- 2
- 10
- 33