I am new to Ubuntu and have programmed in C in the same but java seems to be a bitof a pain. This is what -java version looks like

java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-0ubuntu1~11.10.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

My PATH environment variable is already set to


but when I try setting the JAVA_HOME and CLASSPATH variables I get a warning that says:

Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel',
but failed: Failed to create file '/root/.local/share/recently-used.xbel.JGX9UW': No such file or directory

I do not understand what this means.Has it got to do anything with access permissions?

1 Answer 1


Think you've already setup it. Try running


If it displays any message other than can't find, you've already done that.

  • Well i was being able to compile the .java file so javac was working earlier, i could also see the .class file.It turns out out I didn't have to really set anything more as you said, because doing 'java -cp <path-of-class-file> A.class' did the trick. Commented Apr 17, 2013 at 7:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .