After generating the executable jar file, directly double-click Open app, send HTTP request with Chinese, the server received the Chinese garbled!
How to resolve:
1. Execute the JAVAW command in the cmd command to open the jar executable application:
Open the cmd Command box and enter:
Javaw-dfile.encoding=utf-8-jar D:/client-tool/mobile-client.jar
2. Write a batch file yourself to open the jar executable application:
File contents:
Start Javaw-dfile.encoding=utf-8-jar D:/client-tool/mobile-client.jar
Exit
Note: Exit immediately exits the cmd command box, just like the literal meaning. If you do not add this command, the Black cmd command box will be displayed after startup.
Limited ability, currently only find this solution, if any man has a better solution please leave a message or comment!!! will be extremely grateful!!
Java application executable jar file interacting with server Chinese garbled