How to use Library and Book Library.java and Book.java contain 2 classes that form one application. You need to compile them both doing: javac Book.java Library.java then, when you want to start the application you call the class that has the main method, which is Library in our case: java Library