javac filename.java //(This will compile the program) java filename //(This will run the file)
javac <yourfilename>.java after that do: java <yourfilename>
javac hello.java