diff -r 78537b37b7de make/sun/xawt/FILES_c_unix.gmk
--- a/make/sun/xawt/FILES_c_unix.gmk	Fri Apr 30 17:03:15 2010 -0700
+++ b/make/sun/xawt/FILES_c_unix.gmk	Sun May 09 23:00:52 2010 +0200
@@ -80,4 +80,5 @@
         swing_GTKEngine.c \
         swing_GTKStyle.c \
         rect.c \
-	sun_awt_X11_GtkFileDialogPeer.c
+	sun_awt_X11_GtkFileDialogPeer.c \
+	sun_awt_X11_GtkDirectoryDialogPeer.c
diff -r 78537b37b7de make/sun/xawt/FILES_export_unix.gmk
--- a/make/sun/xawt/FILES_export_unix.gmk	Fri Apr 30 17:03:15 2010 -0700
+++ b/make/sun/xawt/FILES_export_unix.gmk	Sun May 09 23:00:52 2010 +0200
@@ -34,4 +34,5 @@
       sun/awt/X11/XToolkit.java \
       sun/awt/X11/XComponentPeer.java \
       sun/awt/X11/XInputMethod.java \
-      sun/awt/X11/GtkFileDialogPeer.java
+      sun/awt/X11/GtkFileDialogPeer.java \
+      sun/awt/X11/GtkDirectoryDialogPeer.java
diff -r 78537b37b7de make/sun/xawt/mapfile-vers
--- a/make/sun/xawt/mapfile-vers	Fri Apr 30 17:03:15 2010 -0700
+++ b/make/sun/xawt/mapfile-vers	Sun May 09 23:00:52 2010 +0200
@@ -398,7 +398,9 @@
         Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
 
 	Java_sun_awt_X11_GtkFileDialogPeer_run;
-	Java_sun_awt_X11_GtkFileDialogPeer_quit;
+	Java_sun_awt_X11_GtkFileDialogPeer_quit;	
+	Java_sun_awt_X11_GtkDirectoryDialogPeer_run;
+	Java_sun_awt_X11_GtkDirectoryDialogPeer_quit;
 
 	Java_sun_print_CUPSPrinter_initIDs;
 	Java_sun_print_CUPSPrinter_getCupsServer;
diff -r 78537b37b7de src/share/classes/java/awt/DirectoryDialog.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/awt/DirectoryDialog.java	Sun May 09 23:00:52 2010 +0200
@@ -0,0 +1,183 @@
+/*
+ * Copyright 1995-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package java.awt;
+
+import java.awt.*;
+import java.awt.peer.*;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import sun.awt.AWTAccessor;
+
+public class DirectoryDialog extends Dialog {
+
+    static {
+        AWTAccessor.setDirectoryDialogAccessor(
+            new AWTAccessor.DirectoryDialogAccessor() {
+                public void setDirectory(DirectoryDialog directoryDialog, String directory) {
+                    directoryDialog.dir = ("".equals(directory)) ? null : directory;
+                }
+            });
+    }
+    
+    static {
+        /* ensure that the necessary native libraries are loaded */
+        Toolkit.loadLibraries();
+        GraphicsEnvironment.isHeadless();
+    }
+
+    
+    /*
+     * The string specifying the directory to display in the file dialog. This
+     * variable may be <code>null</code>.
+     * 
+     * @serial
+     * 
+     * @see getDirectory()
+     * 
+     * @see setDirectory()
+     */
+    private String dir;
+
+    /**
+     * Creates a dialog for selecting a directory. The title of the
+     * file dialog is initially empty.
+     *
+     * @param parent the owner of the dialog
+     * @since 1.7
+     */
+    public DirectoryDialog(Frame parent) {
+        super(parent, true);
+    }
+
+    /**
+     * Creates a dialog for selecting a directory.
+     *
+     * @param     parent   the owner of the dialog
+     * @param     title    the title of the dialog
+     * @since 1.7
+     */
+    public DirectoryDialog(Frame parent, String title) {
+        super(parent, title, true);
+    }
+
+    /**
+     * Creates a dialog for selecting a directory. The title of the
+     * file dialog is initially empty.
+     *
+     * @param parent the owner of the dialog
+     * @since 1.7
+     */
+    public DirectoryDialog(Dialog parent) {
+        super(parent, "", true);
+    }
+
+    /**
+     * Creates a dialog for selecting a directory.
+     *
+     * @param     parent   the owner of the dialog
+     * @param     title    the title of the dialog
+     * @since 1.7
+     */
+    public DirectoryDialog(Dialog parent, String title) {
+        super(parent, title, true);
+    }
+
+    /**
+     * Gets the directory of this file dialog.
+     * 
+     * @return the (potentially <code>null</code> or invalid) directory of this
+     *         <code>FileDialog</code>
+     * @see java.awt.FileDialog#setDirectory
+     */
+    public String getDirectory() {
+        return dir;
+    }
+
+    /**
+     * Sets the directory of this file dialog window to be the specified
+     * directory. Specifying a <code>null</code> or an invalid directory implies
+     * an implementation-defined default. This default will not be realized,
+     * however, until the user has selected a file. Until this point,
+     * <code>getDirectory()</code> will return the value passed into this
+     * method.
+     * <p>
+     * Specifying "" as the directory is exactly equivalent to specifying
+     * <code>null</code> as the directory.
+     * 
+     * @param dir
+     *            the specified directory
+     * @see java.awt.DirectoryDialog#getDirectory
+     */
+    public void setDirectory(String dir) {
+        this.dir = (dir != null && dir.equals("")) ? null : dir;
+        DirectoryDialogPeer peer = (DirectoryDialogPeer) this.peer;
+        if (peer != null) {
+            peer.setDirectory(this.dir);
+        }
+    }
+
+    /**
+     * Creates the file dialog's peer. The peer allows us to change the look of
+     * the file dialog without changing its functionality.
+     */
+    public void addNotify() {
+        synchronized (getTreeLock()) {
+            if (parent != null && parent.getPeer() == null) {
+                parent.addNotify();
+            }
+            if (peer == null)
+                peer = getToolkit().createDirectoryDialog(this);
+            super.addNotify();
+        }
+    }
+
+    /**
+     * Returns a string representing the state of this <code>FileDialog</code>
+     * window. This method is intended to be used only for debugging purposes,
+     * and the content and format of the returned string may vary between
+     * implementations. The returned string may be empty but may not be
+     * <code>null</code>.
+     * 
+     * @return the parameter string of this file dialog window
+     */
+    protected String paramString() {
+        String str = super.paramString();
+        str += ",dir= " + dir;
+        return str;
+    }
+
+    /**
+     * Reads the <code>ObjectInputStream</code> and performs a backwards
+     * compatibility check by converting either a <code>dir</code> or a
+     * <code>file</code> equal to an empty string to <code>null</code>.
+     * 
+     * @param s
+     *            the <code>ObjectInputStream</code> to read
+     */
+    private void readObject(ObjectInputStream s) throws ClassNotFoundException,
+            IOException {
+        s.defaultReadObject();
+    }
+}
\ No newline at end of file
diff -r 78537b37b7de src/share/classes/java/awt/Toolkit.java
--- a/src/share/classes/java/awt/Toolkit.java	Fri Apr 30 17:03:15 2010 -0700
+++ b/src/share/classes/java/awt/Toolkit.java	Sun May 09 23:00:52 2010 +0200
@@ -392,6 +392,20 @@
      */
     protected abstract FileDialogPeer createFileDialog(FileDialog target)
         throws HeadlessException;
+    
+    /**
+     * Creates this toolkit's implementation of <code>DirectoryDialog</code> using
+     * the specified peer interface.
+     * @param     target the directory dialog to be implemented.
+     * @return    this toolkit's implementation of <code>DirectoryDialog</code>.
+     * @exception HeadlessException if GraphicsEnvironment.isHeadless()
+     * returns true
+     * @see       java.awt.GraphicsEnvironment#isHeadless
+     * @see       java.awt.DirectoryDialog
+     * @see       java.awt.peer.DirectoryDialogPeer
+     */
+    protected abstract DirectoryDialogPeer createDirectoryDialog(DirectoryDialog target)
+        throws HeadlessException;
 
     /**
      * Creates this toolkit's implementation of <code>CheckboxMenuItem</code> using
diff -r 78537b37b7de src/share/classes/java/awt/peer/DirectoryDialogPeer.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/classes/java/awt/peer/DirectoryDialogPeer.java	Sun May 09 23:00:52 2010 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.awt.peer;
+
+/**
+ * The peer interface for {@link DirectoryDialog}.
+ * 
+ * The peer interfaces are intended only for use in porting the AWT. They are
+ * not intended for use by application developers, and developers should not
+ * implement peers nor invoke any of the peer methods directly on the peer
+ * instances.
+ */
+public interface DirectoryDialogPeer extends DialogPeer {
+    
+    /**
+     * Sets the current directory for this dialog.
+     * 
+     * @param dir
+     *            the directory to set
+     * 
+     * @see DirectoryDialog#setDirectory(String)
+     */
+    public void setDirectory(String dir);
+
+}
diff -r 78537b37b7de src/share/classes/sun/awt/AWTAccessor.java
--- a/src/share/classes/sun/awt/AWTAccessor.java	Fri Apr 30 17:03:15 2010 -0700
+++ b/src/share/classes/sun/awt/AWTAccessor.java	Sun May 09 23:00:52 2010 +0200
@@ -414,7 +414,17 @@
          */
         boolean isMultipleMode(FileDialog fileDialog);
     }
-
+    
+    /*
+     * An accessor for the DirectoryDialog class
+     */
+    public interface DirectoryDialogAccessor {
+        /*
+         * Sets the directory the user selects
+         */
+        void setDirectory(DirectoryDialog fileDialog, String directory);
+    }
+    
     /*
      * The java.awt.Component class accessor object.
      */
@@ -459,6 +469,11 @@
      * The java.awt.FileDialog class accessor object.
      */
     private static FileDialogAccessor fileDialogAccessor;
+    
+    /*
+     * The java.awt.DirectoryDialog class accessor object.
+     */
+    private static DirectoryDialogAccessor directoryDialogAccessor;
 
     /*
      * Set an accessor object for the java.awt.Component class.
@@ -614,4 +629,20 @@
         return fileDialogAccessor;
     }
 
+    /*
+     * Set an accessor object for the java.awt.DirectoryDialog class.
+     */
+    public static void setDirectoryDialogAccessor(DirectoryDialogAccessor dda) {
+        directoryDialogAccessor = dda;
+    }
+
+    /*
+     * Retrieve the accessor object for the java.awt.DirectoryDialog class.
+     */
+    public static DirectoryDialogAccessor getDirectoryDialogAccessor() {
+        if (directoryDialogAccessor == null) {
+            unsafe.ensureClassInitialized(DirectoryDialog.class);
+        }
+        return directoryDialogAccessor;
+    }
 }
diff -r 78537b37b7de src/solaris/classes/sun/awt/X11/GtkDirectoryDialogPeer.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/classes/sun/awt/X11/GtkDirectoryDialogPeer.java	Sun May 09 23:00:52 2010 +0200
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+package sun.awt.X11;
+
+import java.awt.*;
+import java.awt.peer.*;
+import sun.awt.AWTAccessor;
+
+/**
+ * DirectoryDialogPeer for the GtkFileChooser.
+ * 
+ * @author Costantino Cerbo (c.cerbo@gmail.com)
+ */
+class GtkDirectoryDialogPeer extends XDialogPeer implements DirectoryDialogPeer {
+    
+    private DirectoryDialog dd;
+    
+    GtkDirectoryDialogPeer(DirectoryDialog target) {
+        super((Dialog) target);
+        this.dd = target;
+    }
+    
+    private native void run(String title, String dir);
+
+    private native void quit();
+
+    /**
+     * Called exclusively by the native C code.
+     */
+    private void setDirectoryInternal(String directory) {
+        AWTAccessor.DirectoryDialogAccessor accessor = AWTAccessor
+                .getDirectoryDialogAccessor();
+        accessor.setDirectory(dd, directory);
+    }
+    
+    @Override
+    public void setVisible(boolean b) {
+        XToolkit.awtLock();
+        try {
+            if (b) {
+                Thread t = new Thread() {
+                    public void run() {
+                        GtkDirectoryDialogPeer.this.run(dd.getTitle(), 
+                                dd.getDirectory());
+                        dd.setVisible(false);
+                    }
+                };
+                t.start();
+            } else {
+                quit();
+                dd.setVisible(false);                
+            }
+        } finally {
+            XToolkit.awtUnlock();
+        }
+    }
+
+    @Override
+    public void dispose() {
+        quit();
+        super.dispose();
+    }
+    
+    @Override
+    public void setDirectory(String dir) {
+        // We do not implement this method because we
+        // have delegated to FileDialog#setDirectory
+    }       
+}
diff -r 78537b37b7de src/solaris/classes/sun/awt/X11/XDirectoryDialogPeer.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/classes/sun/awt/X11/XDirectoryDialogPeer.java	Sun May 09 23:00:52 2010 +0200
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.awt.X11;
+
+import java.awt.*;
+import java.awt.peer.*;
+
+class XDirectoryDialogPeer extends XDialogPeer implements DirectoryDialogPeer {
+
+    XDirectoryDialogPeer(DirectoryDialog target) {
+        super((Dialog) target);
+    }
+
+    public void setDirectory(String dir) {
+        // TODO Still to implement
+    }
+}
\ No newline at end of file
diff -r 78537b37b7de src/solaris/classes/sun/awt/X11/XToolkit.java
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java	Fri Apr 30 17:03:15 2010 -0700
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java	Sun May 09 23:00:52 2010 +0200
@@ -1060,6 +1060,13 @@
         targetCreatedPeer(target, peer);
         return peer;
     }
+    
+    public DirectoryDialogPeer createDirectoryDialog(DirectoryDialog target) {
+        DirectoryDialogPeer peer = checkGtkVersion(2, 4, 0) ? new GtkDirectoryDialogPeer(
+                target) : new XDirectoryDialogPeer(target);
+        targetCreatedPeer(target, peer);
+        return peer;
+    }
 
     public MenuBarPeer createMenuBar(MenuBar target) {
         XMenuBarPeer peer = new XMenuBarPeer(target);
diff -r 78537b37b7de src/solaris/classes/sun/awt/motif/MToolkit.java
--- a/src/solaris/classes/sun/awt/motif/MToolkit.java	Fri Apr 30 17:03:15 2010 -0700
+++ b/src/solaris/classes/sun/awt/motif/MToolkit.java	Sun May 09 23:00:52 2010 +0200
@@ -302,6 +302,11 @@
         return null;
     }
 
+    public DirectoryDialogPeer createDirectoryDialog(DirectoryDialog target) {
+        //TODO Still to implement?
+        return null;
+    }
+    
     public MenuBarPeer createMenuBar(MenuBar target) {
         //MenuBarPeer peer = new MMenuBarPeer(target);
         //targetCreatedPeer(target, peer);
diff -r 78537b37b7de src/solaris/native/sun/awt/sun_awt_X11_GtkDirectoryDialogPeer.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkDirectoryDialogPeer.c	Sun May 09 23:00:52 2010 +0200
@@ -0,0 +1,109 @@
+#include <jni.h>
+#include <stdio.h>
+#include <jni_util.h>
+#include <string.h>
+#include "gtk2_interface.h"
+#include "sun_awt_X11_GtkDirectoryDialogPeer.h"
+
+static JavaVM *jvm;
+static GtkWidget *dialog = NULL;
+
+/* To cache some method IDs */
+static jmethodID setDirectoryInternalMethodID = NULL;
+
+/*
+ * Class:     sun_awt_X11_GtkDirectoryDialogPeer
+ * Method:    quit
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_sun_awt_X11_GtkDirectoryDialogPeer_quit
+(JNIEnv * env, jobject jpeer)
+{
+    if (dialog != NULL)
+    {
+        fp_gtk_widget_hide (dialog);
+        fp_gtk_widget_destroy (dialog);
+
+        fp_gtk_main_quit ();
+        dialog = NULL;
+    }
+}
+
+static void handle_response(GtkWidget* aDialog, gint responseId, gpointer obj)
+{
+    JNIEnv *env;
+    char *current_folder;
+    jclass cx;
+    jstring jcurrent_folder;
+
+    env = (JNIEnv *) JNU_GetEnv(jvm, JNI_VERSION_1_2);
+    current_folder = NULL;
+
+    if (responseId == GTK_RESPONSE_ACCEPT) {
+        current_folder = fp_gtk_file_chooser_get_current_folder(
+                GTK_FILE_CHOOSER(dialog));
+    }
+
+    if (setDirectoryInternalMethodID == NULL) {
+        cx = (*env)->GetObjectClass(env, (jobject) obj);
+        if (cx == NULL) {
+            JNU_ThrowInternalError(env, "Could not get GTK peer class");
+            return;
+        }
+
+        setDirectoryInternalMethodID = (*env)->GetMethodID(env, cx,
+                "setDirectoryInternal", "(Ljava/lang/String;)V");
+        if (setDirectoryInternalMethodID == NULL) {
+            JNU_ThrowInternalError(env,
+                    "Could not get setDirectoryInternalMethodID method id");
+            return;
+        }
+    }
+
+    jcurrent_folder = (*env)->NewStringUTF(env, current_folder);
+
+    (*env)->CallVoidMethod(env, obj, setDirectoryInternalMethodID, jcurrent_folder);
+    fp_g_free(current_folder);
+
+    Java_sun_awt_X11_GtkDirectoryDialogPeer_quit(NULL, NULL);
+}
+
+/*
+ * Class:     sun_awt_X11_GtkDirectoryDialogPeer
+ * Method:    run
+ * Signature: (Ljava/lang/String;ILjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL
+Java_sun_awt_X11_GtkDirectoryDialogPeer_run(JNIEnv * env, jobject jpeer,
+        jstring jtitle, jstring jdir)
+{
+    if (jvm == NULL) {
+        (*env)->GetJavaVM(env, &jvm);
+    }
+
+    fp_gdk_threads_init();
+    fp_gdk_threads_enter();
+
+    const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
+
+    /* Action SELECT_FOLDER */
+    dialog = fp_gtk_file_chooser_dialog_new(title, NULL,
+            GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL,
+            GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
+
+    (*env)->ReleaseStringUTFChars(env, jtitle, title);
+
+    /* Set the directory */
+    if (jdir != NULL) {
+        const char *dir = (*env)->GetStringUTFChars(env, jdir, 0);
+        fp_gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), dir);
+        (*env)->ReleaseStringUTFChars(env, jdir, dir);
+    }
+
+    fp_g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(
+            handle_response), jpeer);
+    fp_gtk_widget_show(dialog);
+
+    fp_gtk_main();
+    fp_gdk_threads_leave();
+}
diff -r 78537b37b7de src/solaris/native/sun/awt/sun_awt_X11_GtkDirectoryDialogPeer.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/solaris/native/sun/awt/sun_awt_X11_GtkDirectoryDialogPeer.h	Sun May 09 23:00:52 2010 +0200
@@ -0,0 +1,31 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class sun_awt_X11_GtkDirectoryDialogPeer */
+
+#ifndef _Included_sun_awt_X11_GtkDirectoryDialogPeer
+#define _Included_sun_awt_X11_GtkDirectoryDialogPeer
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*
+ * Class:     sun_awt_X11_GtkDirectoryDialogPeer
+ * Method:    run
+ * Signature: (Ljava/lang/String;ILjava/lang/String;)V
+ */
+JNIEXPORT void JNICALL Java_sun_awt_X11_GtkDirectoryDialogPeer_run
+(JNIEnv *, jobject, jstring, jstring);
+
+/*
+ * Class:     sun_awt_X11_GtkDirectoryDialogPeer
+ * Method:    quit
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_sun_awt_X11_GtkDirectoryDialogPeer_quit
+(JNIEnv *, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
