i am totally new to Ubuntu as i have done with everything except setting CLASSPATH and PATH for java 6.
i googled this question but didn't get my work done. i don't want to do spam by asking repeating question i am really facing problem that's why i am asking this question
can somebody tell me how to do this but in simple way as i even don't know which type of shell i am using
when i type
what i want is that setting class path for my class which is in another drive not on where ubuntu is installed drive was created by windows and have formate NTFS
total path to my folder where my source file are stored is
and my class file are stored in
.java file can be complied and stored in class folder in windows by doing
now how to attain this in Ubuntu
so totally i am having these question can somebody explain me this and tell me how to do these thing
PS i don want to use netbeans and eclipse or any IDE P.S. Sorry for bad English
In Ubuntu, like all Unix-like operating systems, you must use / (forward slash) instead of \ (backslash) to separate names on a path. Also, to separate entries, you use : (colon) on Ubuntu instead of ; (semi-colon).
If the class files that you want to put on the CLASSPATH are in /media/ENG_SONG/Learning_Assignment/JAVA/class, then just put that directory on the classpath with the -cp switch:
i got my path variable ready now i am only facing problem ib classpath
my current working directory is:
now i complied java program by this:
till now every thing works fine but as soon as i run my program from this directory
i am getting NoClassDefFoundError
i have also tried to chnage my working directory then checked weather it working or not
whereas codechef is package name defined in java file its creating package but not running my program
i know this is related to CLASSPATH
can anybody tell me how to do this in exact way
please guys help me out as i am running out of time
How did you set your PATH? Did you edit .bashrc or another file? Have you set a CLASSPATH in that file? It is usually a bad idea to set a system CLASSPATH; it may be better to delete it and start from scratch.