From 310f4db6adb1dd39f1d9dc95355572466e193388 Mon Sep 17 00:00:00 2001 From: MeFisto94 Date: Sun, 24 Apr 2016 21:52:25 +0200 Subject: [PATCH] Fixed some Reflection Errors due to the Switch from Application to LegacyApplication --- jme3-examples/src/main/java/jme3test/TestChooser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jme3-examples/src/main/java/jme3test/TestChooser.java b/jme3-examples/src/main/java/jme3test/TestChooser.java index f5f54958eb..5c2c572a1f 100644 --- a/jme3-examples/src/main/java/jme3test/TestChooser.java +++ b/jme3-examples/src/main/java/jme3test/TestChooser.java @@ -32,7 +32,7 @@ package jme3test; -import com.jme3.app.Application; +import com.jme3.app.LegacyApplication; import com.jme3.app.SimpleApplication; import com.jme3.system.JmeContext; import java.awt.*; @@ -260,7 +260,7 @@ public void run(){ for (int i = 0; i < appClass.length; i++) { Class clazz = (Class)appClass[i]; try { - if (Application.class.isAssignableFrom(clazz)) { + if (LegacyApplication.class.isAssignableFrom(clazz)) { Object app = clazz.newInstance(); if (app instanceof SimpleApplication) { final Method settingMethod = clazz.getMethod("setShowSettings", boolean.class); @@ -268,7 +268,7 @@ public void run(){ } final Method mainMethod = clazz.getMethod("start"); mainMethod.invoke(app); - Field contextField = Application.class.getDeclaredField("context"); + Field contextField = LegacyApplication.class.getDeclaredField("context"); contextField.setAccessible(true); JmeContext context = null; while (context == null) {