I'm working my way through
Servlets and
JSP and having trouble with the command line compiler. If I move all my files into an eclipse project everything compiles and runs, so it's apparently the compiler switches that I'm using. I don't want to rely on eclipse; I want to learn this from the command line, but this is getting frustrating.
The dev environment folders are setup just like the book. The BeerExpert class compiles fine, but my BeerTest code won't compile. It's in the same folder as the BeerExpert class and I've tried all these compiler commands. (plus a few others, out of desperation)
C:\MyProjects\beerV1>javac -classpath . -d classes src/com/example/model/BeerTest.java
C:\MyProjects\beerV1>javac -classpath c:\myprojects\beerv1\classes\com\example\model\ -d classes src/com/example/model/BeerTest.java
C:\MyProjects\beerV1>javac -classpath classes/com/example/model/BeerExpert.class -d classes src/com/example/model/BeerTest.java
No matter what I try, I get this:
src\com\example\model\BeerTest.java:13: cannot find symbol
symbol : class BeerExpert
location: class com.example.model.BeerTest
BeerExpert expert = new BeerExpert();
Why can't my
test class find the BeerExpert class? Like I said, it works in eclipse.
Here's the BeerTest code
I know this is probably obvious to someone and I'll kick myself when I see the solution. Help please?
Thanks!