Closed victoryeo closed 4 years ago
What do you try to do?
Usually DBusConnection.getConnection(DBusBusType.SESSION);
should be enough to create a Dbus user session.
Anyway, the error looks like you trying to call a non-existent method. Is your runtime classpath using the same libraries than the compile time classpath?
I use Netbean , i add dbus-java dependency to pom.xml , the version is 3.0.2.
When i call the function below: DBusConnection.getConnection(DBusBusType.SESSION, false, 100000);
There is an error:
no suitable method found for getConnection(DBusBusType,boolean,int) method DBusConnection.getConnection(String,boolean,boolean) is not applicable (argument mismatch; DBusBusType cannot be converted to String) method DBusConnection.getConnection(Supplier,boolean,boolean) is not applicable
(argument mismatch; DBusBusType cannot be converted to Supplier)
I check the file, dbus-java/src/main/java/org/freedesktop/dbus/connections/impl/DBusConnection.java there is : public static DBusConnection getConnection(DBusBusType _bustype, boolean _shared, int _timeout)
Why the function does not match ?