Fixed errors for java 6

This commit is contained in:
nathan 2019-06-15 00:02:03 +02:00
parent 580eff8691
commit ac0bc48591
2 changed files with 3 additions and 2 deletions

View File

@ -131,7 +131,7 @@ public class ClassLoaderUtil {
* @param className the name to check * @param className the name to check
*/ */
public static public static
boolean isClassLoaded(ClassLoader classLoader, String className) { boolean isClassLoaded(final ClassLoader classLoader, final String className) {
// Pointer javaEnv = getJavaEnv(); // Pointer javaEnv = getJavaEnv();
// //
// NativeLibrary library = ((Library.Handler) libjvm).getNativeLibrary(); // NativeLibrary library = ((Library.Handler) libjvm).getNativeLibrary();

View File

@ -128,12 +128,13 @@ class SwtDispatch {
return false; return false;
} }
final Class<?> clazz = osClass;
Method method = AccessController.doPrivileged(new PrivilegedAction<Method>() { Method method = AccessController.doPrivileged(new PrivilegedAction<Method>() {
@Override @Override
public public
Method run() { Method run() {
try { try {
return osClass.getMethod("gtk_major_version"); return clazz.getMethod("gtk_major_version");
} catch (Exception e) { } catch (Exception e) {
return null; return null;
} }