I'm following book HeadFirst Servlets and JSPs.
In an example, to compile the servlet, it uses the command javac -classpath /usr/share/tomcat7/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java
javac -classpath /usr/share/tomcat7/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java
I don't understand the effect of ":." after classes
in this command.
The :
is the separator and .
stands for the current directory. So it's saying "the class path should contain the jar file '/usr/share/tomcat7/lib/servlet-api.jar' and the 'classes' directory, as well as the current directory."
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.