Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help me with the servlet compiling

 
Wendy Lum
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am reading the HFSJ book (chapter 3, page 84-85) and come into a compile trouble when I tried to compile the servlet which calls a method of a model class. I created the directory exactly as what is said in the book and I created the model class (BeerExpert.java) in package com.example.model and it compiles.

But when I modified the servlet to import com.example.model.* to call the getBrands() method of class BeerExpert which I already compiled, the compiler gave errors saying that it couldn't find the com.example.model package.

Can anyone help me out? I have checked everything and I don't have any clue. Thanks for your help in advance.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The path to com.example.model is probably not set in the CLASSPATH.
[ December 12, 2005: Message edited by: Satou kurinosuke ]
 
Wendy Lum
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem Solved. I didn't notice the different seperators used in windows and unix in classpath. Yes, I am not an experienced java programmer, but I am learning. Ok? Thank you anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic