It's most likely a classpath issue. It looks like you're not putting these classes in a package, so it should be as simple as making sure that the current directory (".") is part of the class path. Then you do the compile (javac) and execute (java) commands in the directory where the source is located.
You can add "." to the classpath as part of the environment, or you can explicitly specify it using the "-cp" or "-classpath" flags.
There are thousands of web sites where you can get details on how to set up the classpath, and I'm sure there is a link here at JavaRanch that describes it as well. I'll see if I can find a good one and add it to this post.