Skip to content

Commit a8db52d

Browse files
author
Haavar Valeur
committed
Adding a workaround for a bug in openJDK. Calling Toolkit.getDefaultToolkit() after a call to FileManager.findFolder() will cause Toolkit.getDefaultToolkit() to hang.
1 parent 1a44015 commit a8db52d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/src/processing/app/macosx/Platform.java

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
package processing.app.macosx;
2424

2525
import java.awt.Insets;
26+
import java.awt.Toolkit;
2627
import java.io.File;
2728
import java.io.FileNotFoundException;
2829
import java.lang.reflect.Method;
@@ -42,6 +43,12 @@
4243
*/
4344
public class Platform extends processing.app.Platform {
4445

46+
public Platform() {
47+
// workaround for in OS X port of openJdk:
48+
//http://mail.openjdk.java.net/pipermail/macosx-port-dev/2013-January/005261.html
49+
Toolkit.getDefaultToolkit();
50+
}
51+
4552
public void setLookAndFeel() throws Exception {
4653
// Use the Quaqua L & F on OS X to make JFileChooser less awful
4754
UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");

0 commit comments

Comments
 (0)