Hi,
As per your query it is seen that you are not using any build tool,first you have install a build tool and accordingly have to set the environment path to that machine,and then you have define required targets there,for example you want to compile your .java program and put class files in another folder,then you have to write a target which will carry out your intended work.You can't directly put java file name to the build options,you have to provide the target name which you want to run.A best tool i am providing you is Apache ANT.Any query you can ask.
Regards,
Nayan