diff --git a/build.gradle b/build.gradle index b4ccb9f..7863d80 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,15 @@ mainClassName = 'rlbotexample.JavaExample' // This directory will be created and the interface dll copied into it at runtime. // The end result is that the interface dll will be available for loading. def dllDirectory = 'build/dll' -applicationDefaultJvmArgs = ["-Djna.library.path=" + dllDirectory] + +applicationDefaultJvmArgs = ["-Djna.library.path=" + dllDirectory, "-Duser.dir=MY_WORKING_DIR"] + +// https://www.mkyong.com/gradle/gradle-application-plugin-app_home-in-applicationdefaultjvmargs/ +startScripts { + doLast { + windowsScript.text = windowsScript.text.replace('MY_WORKING_DIR', "%~dp0.") + } +} dependencies { // Fetch the framework jar file