You don't need to run the java code on the Gnome desktop, per se. You just need to have the Gnome libraries installed so that Java recognizes it (as ccheneson said).
If you are running a new version of Ubuntu, it doesn't come with the gnome libraries because it uses Unity. Try installing libgnome2-0
. When I installed it a few other packages came with it (libbonobo2-0
, libbonobo2-common
, libgnomevfs2-0
, libgnomevfs2-common
) so I don't know if libgnome2-0
is sufficient or if any of the others are necessary as well. But then my 12.04 Ubuntu system was recognized by the Java API.
I know this post is relatively old - but this question is in a variety of places online and the only place I found the "correct" answer (for me) was here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…