Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling Issue

 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers!

I'm trying to work through the MVC tutorial in the Head First Servlets & JSP book. I've set up my development and deployment environments as illustrated, copied the code, and now want to compile.

I've written a .bat file to help me do this. However, the JVM cannot find the BeerExpert source file.

Here is my .bat file:




Any suggestions would be appreciated! Thanks again!
 
Norm Radder
Ranch Hand
Posts: 733
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you having compile or runtime errors?
Could you post the error messages?

You are showing a javac command in the batch file which does not start a jvm.
The java command starts the jvm.

Are the source files in packages? Then the classpath must be set to point to the start of the package path.
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the error message

BeerSelect.java:3: package com.example.model does not exist
import com.example.model.BeerExpert;
^
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Norm,

I got it! After reading your response more carefully

"Are the source files in packages? Then the classpath must be set to point to the start of the package path."

I realized I was not doing that correctly.

Thanks again!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic