you need to set the path to Java's JDK?
directory. Substitute the ? with the version of the JDK on
your machine(the directory's name). Once you set the
path in the environment variables you will be able to
compile and run any .java file from any directory. I
think the problem you're having is setting the 'path'.