Fix JNI embed location on Windows.

Make it Windows version agnostic and fix the amd64 runtime / x86-64 build
architecture naming difference.

See artf4198.
This commit is contained in:
Peter Johnson
2015-09-20 10:56:06 -07:00
parent b80d2f6659
commit e2879b7bf2
2 changed files with 11 additions and 1 deletions

View File

@@ -15,7 +15,11 @@ public class NetworkTablesJNI {
if (!libraryLoaded) {
try {
String osname = System.getProperty("os.name");
String resname = "/" + osname + "/" + System.getProperty("os.arch") + "/";
String resname;
if (osname.startsWith("Windows"))
resname = "/Windows/" + System.getProperty("os.arch") + "/";
else
resname = "/" + osname + "/" + System.getProperty("os.arch") + "/";
System.out.println("platform: " + resname);
if (osname.startsWith("Windows"))
resname += "ntcore.dll";