javac *.java and java *.class
sample from http://docs.oracle.com/javase/tutorial/essential/concurrency/simple.html