Question

When I run my application within Netbeans everything works fine - I can read/write unicode texts and filenames, but when I run the jar by double click or with java -jar test.jar I only get strange symbols...

Is this a known issue? I use jdk 1.7 but build 1.6 byte code with it...

Thanks in advance for any help :D

EDIT: I'm not talking about stdout - the app reads and writes files and has a GUI

Was it helpful?

Solution

If I run the application from terminal System.getProperty("file.encoding") outputs cp152, but if I run it from Netbeans it results UTF-8. this: java -Dfile.encoding=UTF-8 -jar XY.jar solves my problem, but I don't like the solution...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top