Hello Everyone,

at first thank you for reading this post. I've searched nearly 4 Hours the whole Internet but did not find an answer which pleased we well. Does anyone know how get access to the gnome keyring tool through dbus in an Java Application. I shall write an Java app which connects to a LDAP Server, and we wanna authenficate to that Server through Keyring. I've downloaded the jars and put them into netbeans and wrote the following code

try {
          //DirectConnection dc = new DirectConnection("unix:path=/org/gnome/seahorse/keys");
          conn = DBusConnection.getConnection(DBusConnection.SESSION);
         } catch (Exception ex) {
             JOptionPane.showMessageDialog(new JFrame(),
             "Es ist ein Fehler aufgetreten.\n" + ex.getMessage() + "\n",
             "Ein Fehler ist aufgetreten",
             JOptionPane.ERROR_MESSAGE);
        }

And it works!
But how have I to go on. Does anybody know a good tutorial or has an code snippet by the hand. I would be realy amused. Sorry about my bad english.

Hi again, i got a Connection to that gnome keyring with the folling code.

try {
          conn = DBusConnection.getConnection(DBusConnection.SESSION);
          DBusInterface remoteObject = conn.getRemoteObject("org.gnome.seahorse", "/org/gnome/seahorse/keys");                    
        } catch (Exception ex) {
              conn.disconnect();
              ex.printStackTrace();
              JOptionPane.showMessageDialog(new JFrame(),
              "Es ist ein Fehler aufgetreten.\n" + ex.getMessage() + "\n",
              "Ein Fehler ist aufgetreten",
              JOptionPane.ERROR_MESSAGE);
        }

But know my next question how can i call a method of this service?

This article has been dead for over six months. Start a new discussion instead.