This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Head first Servlet & JSP : command syntax I cann't explain why  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I run the programs in Chap3 of Head First Servlet and JSP.

For compiling the Servlet version 1, I used the command as the book stated "javac -classpath /tomcat55/common/lib/servlet-api.jar:classes:. -d classes src/com/example/web/BeerSelect.java".

It will show up the error messages as "package javax.servlet does not exist...." , but if I leave out the flag ":classes:." after the "...servlet-api.jar" it compile without error, and testing with servlet is OK.

What this flag ":classes:." means ? why it causes problem in my environment ? Any idea ! looking forward to hear from you !
Thanks!

Albert
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Under Windows, you have to use semicolons instead :
";classes;."
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java In General (Beginner) where javac and classpath issues are discussed.

You can also find information on compiling servlets in our servlets FAQ:
http://faq.javaranch.com/view?CompilingServlets
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!