com.example.model needs to be in the CLASSPATH. For example : C:/java/src/com/example/model/BeerExpert.java If you want to BeerExpert, the compiler has to find it. Where does it look for classes ? In the CLASSPATH. So C:/java/src has to be in your CLASSPATH.