The Java documentation includes a description on How Classes are Found. The easiest thing would be to include the folder where Sample can be found on the command line, like so:
It seems I misunderstood the problem; I thought that you wanted to execute your Java program from another Java program. For your problem the class path is exactly what you need.