I am new to Java and I was wondering how I can compile a file with my javac compiler without having the file in the directory. Now I am compiling my java by having putting my files.java into the bin directory in which my javac compiler is in. I would like to compile my files from any directory with my javac compiler. How do i go about doing this.

Help is appreciated.

Please provide code if possible.