Mac OS X: Add a Toolkit.getDefaultToolkit() incantation to MacOSXSysImplementation to avoid hangs on Mac OS X 10.3
This commit is contained in:
parent
83ac2f22d0
commit
1e5b712747
|
@ -307,7 +307,8 @@
|
||||||
<target name="all" description="Creates the Java archives and the natives for the current platform" depends="jars, compile_native"/>
|
<target name="all" description="Creates the Java archives and the natives for the current platform" depends="jars, compile_native"/>
|
||||||
|
|
||||||
<!-- Create ONLY the jar archives -->
|
<!-- Create ONLY the jar archives -->
|
||||||
<target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars">
|
<target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, compile, -createjars">
|
||||||
|
<!-- <target name="jars" description="Creates the Java archives ONLY and places them in libs/" depends="-initialize, generate-all, compile, -createjars">-->
|
||||||
<move todir="libs/">
|
<move todir="libs/">
|
||||||
<fileset dir="${lwjgl.temp}/jar">
|
<fileset dir="${lwjgl.temp}/jar">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
|
|
|
@ -34,6 +34,7 @@ package org.lwjgl;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
import java.security.PrivilegedExceptionAction;
|
import java.security.PrivilegedExceptionAction;
|
||||||
|
import java.awt.Toolkit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -42,6 +43,11 @@ import java.security.PrivilegedExceptionAction;
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
class MacOSXSysImplementation extends J2SESysImplementation {
|
class MacOSXSysImplementation extends J2SESysImplementation {
|
||||||
|
static {
|
||||||
|
// Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
|
||||||
|
Toolkit.getDefaultToolkit();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean openURL(String url) {
|
public boolean openURL(String url) {
|
||||||
try {
|
try {
|
||||||
Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
|
Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
|
||||||
|
|
Loading…
Reference in New Issue