'Gtk-Message: Failed to load module "unity-gtk-module"

I am running ubuntu 15.10. I am trying to execute a java GUI program under eclipse that imports a ton of libraries including javafx and google map libraries.

The java program fails to execute and gives the error:

Gtk-Message: Failed to load module "unity-gtk-module"

I have googled the error message " Gtk-Message: Failed to load module "unity-gtk-module" " - but none of the solutions I have found on stackoverflow or through google appear to work for me.

Any ideas on how to diagnose and fix this error?



Solution 1:[1]

I got this error running java starter code for a Coursera course in Eclipse. I noticed errors in the java code - java error was "Lambda expressions are allowed only at source level 1.8 or above". I am using 1.8 JDK. Problem was that Java Compiler compliance level was set to 1.7 for the project in eclipse. I changed the compliance level to 1.8 and program ran without error.

Solution 2:[2]

sudo apt-get install unity-gtk2-module:i386

Solved it for me. (Note: I was running x86 app on x64 system.)

Solution 3:[3]

Below worked for my Ubuntu 16.04

sudo apt install unity-gtk3-module

My case is that even running emacs would trig that warning.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pat Claffey
Solution 2 Andriy
Solution 3 Liyong Zhou