I'm reading Head first
Servlets and
JSP 2nd Edition and I have a problem when I try to compile my servlet class.
Here is my files (I'm actually on the beerV1 folder) :
.
└── beerV1
├── classes
│ └── com
│ └── example
│ ├── model
│ │ └── BeerExpert.class
│ └── web
│ └── BeerSelect.class
├── etc
│ └── web.xml
├── lib
├── src
│ └── com
│ └── example
│ ├── model
│ │ └── BeerExpert.java
│ └── web
│ └── BeerSelect.java
└── web
└── form.html
What I have to do :
I'm following these instructions from the book :
cd beerV1
javac -classpath /Users/bert/Applications2/tomcat/common/lib/
servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java
What I've done :
Since I'm on windows, I replaced ":" with ";".
So I did this :
javac -classpath /mnt/c/apache-tomcat-9.0.20/lib/servlet-api.jar;classes;. -d classes src/com/example/web/BeerSelect.java
But the output I get is this :
error: no source files
classes: command not found
-bash: .: -d: invalid option
.: usage: . filename [arguments]
I don't understand this problem because I did exactly what I was asked to do in the book.