Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java VM long argument prevents .exe from start under windows #28

Closed
titovmaxim opened this issue Oct 10, 2014 · 0 comments
Closed

Java VM long argument prevents .exe from start under windows #28

titovmaxim opened this issue Oct 10, 2014 · 0 comments

Comments

@titovmaxim
Copy link
Contributor

UTF-8 encoding must be explicitly specified under Windows. I.e. argument "-Dfile.encoding=UTF-8" must be used to start JVM. Otherwise all non ascii strings becomes corrupted in the game. It is true for official JRE 7, as well as for unofficial JRE 7.

So the game is started with corrupting russian letters by the .exe after packing. The game could be successfully started with correct letters by manually executing:

jre\bin\java.exe -jar -Dfile.encoding=UTF-8 desktop.jar

However .exe is not working when one includes "-Dfile.encoding=UTF-8" argument in config. I.e. the .exe just does nothing (now errors, no game start) with the following config:

{
   "jar": "desktop.jar",
   "mainClass": "com/mmxgames/ttj/desktop/Launcher",
   "vmArgs": [
      "-Xmx1G",
      "-Dfile.encoding=UTF-8"
   ]
}

I was experimenting and found this happens if the argument exceeds 14 characters. So it starts with argument "-Dfile.encodin" but does not start with argument ""-Dfile.encoding" (of corse the argument itself does not work).

@titovmaxim titovmaxim changed the title Encoding Java VM arg prevent .exe from start under windows Java VM long argument prevents .exe from start under windows Oct 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant