Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

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

1 Answer 1

up vote 0 down vote accepted

Think you've already setup it. Try running

javac

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

 
discard

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.