How to use The .java files are the code and the .class file are the compiled code. To compile from the project root: javac -d out FactoryPattern/FactoryPatternPizzaStore/*.java To run: java -cp out FactoryPattern.FactoryPatternPizzaStore.PizzaTestDrive