I am on chapter 3 of Headfirst Servlets and JSP.
This is my input to windows 7 command line:
D:\Workspaces\ServletsJSP\MyProjects\beerV1>javac -classpath
C:\Tomcat\tomcat\lib\servlet-api.jar;classes;. -d
src\com\example\web\BeerSelect.java
This is the error message:
javac: not a directory: src\com\example\web\BeerSelect.java
Usage: javac <options> <source files>
use -help for a list of possible options
I have BeerSelect.java in this directory: D:\Workspaces\ServletsJSP\MyProjects\beerV1\src\com\example\web
You haven’t specified the directory of the
-dflag. This flag is used to specify where the class file should be put. You probably want to change your command to something like this:D:\Workspaces\ServletsJSP\MyProjects\beerV1>javac -classpath C:\Tomcat\tomcat\lib\servlet-api.jar;classes;. -d bin src\com\example\web\BeerSelect.javaAssuming bin is where you want your class files.