• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble compiling servlet HFSJ pg 85

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I'm having trouble compiling Servlet version 2 of HFSJ on page 85. Apparently,it's having trouble importing the com.example.model.* package.Therefore, the BeerExpert class can't be found. I followed exactly what the book said to do. Can anyone help?

Errors are below

package com.example.model does not exist
import com.example.model.*;
^
src/com/example/web/BeerSelect.java:22: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
src/com/example/web/BeerSelect.java:22: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be = new BeerExpert();
^
3 errors
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ken,

I got the same problem...
Try to change the ":" by ";" when compile.

javac - classpath /Users/bert.... servlet-api.jar; <----- here
classes; <--- and here
 
Ken Teoh
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Caroline,

Thanks alot. I managed to make it work.
Can you explain why using ";" works?

Thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unix uses colons to separate path entries; Windows uses semicolons. Why didn't Windows adopt the Unix notation? It has its roots in DOS, which emulates parts of CP/M, and CP/M does it this way (that's a guess, but probably a correct one). And, of course, the colon is used to separate the drive letter from the path on that drive.
 
reply
    Bookmark Topic Watch Topic
  • New Topic