Mac OS X: Removed reflection from MacOSXSysImplementation
This commit is contained in:
parent
31c2b22dd8
commit
84e6263a8e
|
@ -36,6 +36,8 @@ import java.security.AccessController;
|
||||||
import java.security.PrivilegedExceptionAction;
|
import java.security.PrivilegedExceptionAction;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
|
import com.apple.eio.FileManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author elias_naur <elias_naur@users.sourceforge.net>
|
* @author elias_naur <elias_naur@users.sourceforge.net>
|
||||||
|
@ -50,18 +52,7 @@ class MacOSXSysImplementation extends J2SESysImplementation {
|
||||||
|
|
||||||
public boolean openURL(String url) {
|
public boolean openURL(String url) {
|
||||||
try {
|
try {
|
||||||
Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
|
FileManager.openURL(url);
|
||||||
public Object run() throws Exception {
|
|
||||||
try {
|
|
||||||
Class com_apple_eio_FileManager = Class.forName("com.apple.eio.FileManager");
|
|
||||||
return com_apple_eio_FileManager.getMethod("openURL", new Class[]{String.class});
|
|
||||||
} catch (Exception e) {
|
|
||||||
LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
openURL_method.invoke(null, new Object[]{url});
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
|
LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
|
||||||
|
|
Loading…
Reference in New Issue