0

I wrote a version of poker that uses special characters to represent the particular suits of the cards (for example, ♠) when printed to the console. Everything is fine in Eclipse, it prompts me to save as UTF-8 and it works just fine. However, when I converted my runnable jar to an exe via Launch4j, it will show a hand as [K ?, A ?] for instance. I attempted to add the JVM option -Dfile.encoding="UTF-8" but have not found any luck. Any ideas?

1 Answers1

0

After doing some research, I found an answer. In java you need to create a seperate PrintStream which is needed whenever you want to print any Unicode Character, like so. Then you need to type cmd /c chcp 65001 to change the recognized CharSet, then you will be able to run the program just fine.