aspose file tools*
The moose likes Beginning Java and the fly likes Compiling Issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiling Issue " Watch "Compiling Issue " New topic
Author

Compiling Issue

Claude Cundiff
Ranch Hand

Joined: Mar 20, 2008
Posts: 78
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

Joined: Aug 10, 2005
Posts: 685
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

Joined: Mar 20, 2008
Posts: 78
Here is the error message

BeerSelect.java:3: package com.example.model does not exist
import com.example.model.BeerExpert;
^
Claude Cundiff
Ranch Hand

Joined: Mar 20, 2008
Posts: 78
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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling Issue