Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javac compiling problem

 
Larry Frissell
Ranch Hand
Posts: 82
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on the HeadFirst Servlets, but my problem does not appear to be a servlet problem. I have been compiling files without any problems up to this point. I am trying to compile MyServletContextListener which is giving me errors because it can not find the Dog class. I have complied the Dog class without errors.

Terminal command with errors

DAD$ javac -classpath /Users/Dad/tomcat/lib/servlet-api.jar:clases:. -d classes src/com/example/MyServletContextListener.java
src/com/example/MyServletContextListener.java:9: cannot find symbol
symbol : class Dog
location: class com.example.MyServletContextListener
Dog d = new Dog(dogBreed);
^
src/com/example/MyServletContextListener.java:9: cannot find symbol
symbol : class Dog
location: class com.example.MyServletContextListener
Dog d = new Dog(dogBreed);
^
2 errors




Dog Class which compiles fine


MyServletContextListener which is not compiling
 
Larry Frissell
Ranch Hand
Posts: 82
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found my problem, classses was spelled wrong in the terminal command.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic