• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

Compiling a servlet

 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

In HFS book, one of the chapters gives the following syntax to compile the servlet

%javac -classpath /yourpath/tomcat/common/lib/servlet-api.jar -d classes src/ch1servelet.java

Project1
--Src -> Ch1Servlet.java
--classes
--etc -> web.xml

when we compile this the class file lands in the Project1-Classes folder automatically, but we did not specify this path. How does this happend...

please help!

Thanks
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
-d classes sets the destinationation directory to the classes folder.

It's pretty safe to say the javac command is being called from the Project1 folder.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

when we compile this the class file lands in the Project1-Classes folder automatically, but we did not specify this path. How does this happend...



Thats why clearing SCJP 5.0 is so fun

-Ashley
SCJP 5.0
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic