• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MVC Example Chapter 3 HFS

 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

I was trying out the MVC example of chapter 3.

I created a Model under d:\myprojects\beerv1\src\com\example\model\BeerExpert.java

I created a controller under
d:\myprojects\beerv1\src\com\example\web\BeerSelect.java

The model was successfully compiled & the target folder of the class file was
d:\myprojects\beerv1\classes\com\example\model\BeerExpert.class

When I try to comile the controller, it gives me a error saying that com.example.model, no such package exists. I am trying to use the model in my servlet. Can you tell me where I am going wrong

I am compiling the controller with the following syntax
d:\myprojects\beerv1>javac -d classes src\com\example\web\BeerSelect.java

Please help...
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try to include classpath "-classpath classes" when you compile your code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic