浏览代码

* Fix message "WARNING: Cannot locate native library: libbulletjme"

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8321 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
sha..rd 14 年之前
父节点
当前提交
adf65d648a
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      engine/src/desktop/com/jme3/system/Natives.java

+ 10 - 1
engine/src/desktop/com/jme3/system/Natives.java

@@ -140,6 +140,15 @@ public class Natives {
         }
         return null;
     }
+    
+    protected static boolean isUsingNativeBullet(){
+        try {
+            Class clazz = Class.forName("com.jme3.bullet.util.NativeMeshUtil");
+            return clazz != null;
+        } catch (ClassNotFoundException ex) {
+            return false;
+        }
+    }
 
     protected static void extractNativeLibs(Platform platform, AppSettings settings) throws IOException {
         String renderer = settings.getRenderer();
@@ -147,7 +156,7 @@ public class Natives {
         boolean needLWJGL = false;
         boolean needOAL = false;
         boolean needJInput = false;
-        boolean needNativeBullet = true;
+        boolean needNativeBullet = isUsingNativeBullet();
         if (renderer != null) {
             if (renderer.startsWith("LWJGL")) {
                 needLWJGL = true;