I'm working through the Heads Up JSPs and
Servlets book. I've created a directory structure that looks like this:
I have a class called "BeerExpert.class" located in classes\com\example\model. The first line in the source code is:
"package com.example.model;"
I have a
java source file called "BeerSelect.java" located in src\com\example\web.
The relevant import statement is:
"import com.example.model.*;"
I open a command window and change to "c:\MyProjects\BeerV1".
I then attempt to compile BeerSelect.java with this command line:
"javac -d classes src\com\example\web\BeerSelect.java"
and get this error message:
"Package com.example.model does not exist"
Can anyone advise me on what I should be doing differently? I'm sure it must be a problem with paths, but I'm stumped.
Thanks.
EDIT by mw: Added
Code Tags to keep indentation of directory structure intact. (Otherwise, it's left-justified.)
[ March 19, 2006: Message edited by: marc weber ]