Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
    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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

About Head first, Servlets and JSP, problem #1 page 81.

Posts: 12
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am currently stuck at the part where the author asks you to compile the servlet using "javac", he then explains it in the os shell, but I am a windows user.
I am having problems to execute that line of code. I think that my JAVA_HOME and etc must be set up correctly since I created a sample and
compiled it useing javac and it created the correspondent .class file.
I am failing to see the logic of this command, you specify a class path to the servlet-api.jar file and then you give it another path so it can execute the .java file?
I would like to get out of this hole I am in right now. These are the paths to my files:

C:\Users\Carlos L\Tomcat\apache-tomcat-8.0.28\bin\servlet-api.jar
and this is where my file is:
C:\Users\Carlos L\Tomcat\My Tomcat Projects\beer-v1\src\com\example\web\

so far i have been imputing:
javac -classpath C:\Users\Carlos L\Tomcat\apache-tomcat-8.0.28\bin\servlet-api.jar; classes:. d-classes src\com\example\web\

and I am getting this error:

javac: invalid flag: d-classes
usage:javac <options> <source files>

This should not be this hard.
Creator of Enthuware JWS+ V6
Posts: 3344
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Report post to moderator
You might have a look at my notes in the ScwcdLinks.
Posts: 67403
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question more than once. Your question has already been answered in your other post.
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic