MovingBlocks / TerasologyLauncher

Terasology Launcher is the official launcher for the open source game Terasology.
http://terasology.org/
Apache License 2.0
154 stars 76 forks source link

provide natives directory to java when launching process #579

Open keturn opened 4 years ago

keturn commented 4 years ago

The launcher knows where the game is installed and what operating system it's running on.

It can add a -Djava.library.path= argument to java, set to the natives directory for this platform.

See https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#getProperties()

This will let the main Terasology process avoid trying to change paths at runtime, which is known to interact poorly with some security policies — especially in more recent versions of Java.

See https://github.com/MovingBlocks/Terasology/pull/3937

keturn commented 4 years ago

(pssst, merge #571 before messing any further with java parameters.)