Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 0 down vote accepted

Think you've already setup it. Try running


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

share|improve this answer
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. – heena surve Apr 17 '13 at 7:14
So please accept my answer. – Sri Harsha Chilakapati Apr 17 '13 at 7:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.