diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2008-03-22 02:28:22 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2008-03-22 02:28:22 +0000 |
commit | 0f770551cebca90c92b7a39b0e0135a445af51f9 (patch) | |
tree | c1fc0b535133c7d292808c8cee22817e5cdec0e3 /src/java/com/e1/pdj/PDJSystem.java | |
parent | a764e59e1d3a8e330f0d484fdb26b35ca3f0b2e4 (diff) |
merging in pdj-0.8.4.tar.gz from http://www.le-son666.com/software/pdj/
svn path=/trunk/externals/loaders/pdj/; revision=9624
Diffstat (limited to 'src/java/com/e1/pdj/PDJSystem.java')
-rw-r--r-- | src/java/com/e1/pdj/PDJSystem.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/java/com/e1/pdj/PDJSystem.java b/src/java/com/e1/pdj/PDJSystem.java index 3d30a53..1fd50d2 100644 --- a/src/java/com/e1/pdj/PDJSystem.java +++ b/src/java/com/e1/pdj/PDJSystem.java @@ -7,6 +7,7 @@ import java.awt.Frame; import java.awt.Toolkit; import java.io.*; +import java.awt.GraphicsEnvironment; /** * Startup class for pdj. */ @@ -50,7 +51,7 @@ public class PDJSystem { // this is a hack to be sure that statics of MaxSystem are loaded // before everything Class cls = MaxSystem.class; - + String osname = System.getProperty("os.name"); if ( osname.indexOf("Linux") != -1 ) { @@ -71,20 +72,13 @@ public class PDJSystem { if ( osname.indexOf("OS X") != -1 ) { // maps PD object as a JVM native library - try { - Runtime.getRuntime().load(pdjHome + "/pdj.pd_darwin"); - } catch (UnsatisfiedLinkError e ) { - Runtime.getRuntime().load(pdjHome + "/pdj.pd_imac"); - } + Runtime.getRuntime().load(pdjHome + "/pdj.d_fat"); loaded = 1; - - // this will initialize the AWT component in another thread - new Thread(new Runnable() { - public void run() { - Class clz = Component.class; - } - }).start(); + if ( System.getenv("PDJ_USE_AWT") != null ) { + GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); + Toolkit.getDefaultToolkit(); + } GenericCompiler.rtJar = "/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar:"; return; |