PDA

View Full Version : [xubuntu] Desktop integration of Java apps in Xubuntu



jdarias
April 27th, 2008, 11:26 PM
I've switched from Gnome to xfce and so far the adaptation has been nice despite some missing things.
The main one is the lack of desktop integration of Java apps and Xubuntu. They do not use the native theme. Instead they use a Java look.
This didn't happen in Ubuntu. Is it possible to make this happen in Xubutu?

Edit: forgot to mention: this happens with FreeMind and the Java Panel so far. Got to try Azureus. This is Xubuntu 8.04

jdarias
April 29th, 2008, 03:49 AM
bump

revertex
April 30th, 2008, 02:18 AM
look here

http://ubuntuforums.org/showthread.php?t=383394

http://java.sun.com/docs/books/tutorial/uiswing/lookandfeel/plaf.html#steps

jdarias
May 1st, 2008, 12:46 AM
I looked both pages, followed the advice of the thread but it didn't work. The other one (from java) was more like developer relevant stuff.

revertex
May 5th, 2008, 08:33 PM
from the java page:


Specifying the Look and Feel: Command Line

You can specify the L&F at the command line by using the -D flag to set the swing.defaultlaf property. For example:
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKL ookAndFeel MyApp

janfsd
May 6th, 2008, 04:02 PM
I got a similar problem, it might be related. I am using Gnome though, but when running a java application with root, i get the metal theme. It works normally for normal user, it loads the gtk theme, but I don't know why this happens. In Gutsy it didn't.

You could try this in the terminal:

export _JAVA_OPTIONS="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKL ookAndFeel"
and after run freemind and see, and check the terminal messages, maybe you can see some message related to your problem. I am still looking for a solution to my problem.

Another option could be creating, or editing the swing.properties file. It should be here: /usr/lib/jvm/java-6-sun/jre/lib
if you are using java6:

# Swing properties
swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLo okAndFeel

revertex
May 6th, 2008, 05:25 PM
I give up, none of these options works for me.

janfsd
May 6th, 2008, 05:44 PM
And for the second option, you have to check wich java you are using:

sudo update-alternatives --list java
Change to java-6-sun if necessary.

Anyway the metal theme is not that bad. :D

janfsd
May 6th, 2008, 05:45 PM
Sorry for double post. Delete this if possible.