Frank,
 
Have you included the following line inside you CCMsg.java???
 
        package dgi;
 
This line should be the first line of code inside your CCMsg.java (even before all your imports).
I think that might help.
 
Regards,
Frans
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Frank Welch
Sent: Friday, April 05, 2002 9:15 PM
To: [EMAIL PROTECTED]
Subject: Servlet Compile problem: Bad Class File

I am having a heck of a time importing my own classes into my servlet.
 
Under Windows 2000 Pro and using ANT, I have no problem importing standard classes, but importing my own classes consistently gets an error.
 
I have the following import statements:
import java.io.*;

import java.text.*;

import java.util.*;

import javax.servlet.*;

import javax.servlet.http.*;

import org.xml.sax.SAXException;

import org.xml.sax.InputSource;

import dgi.CCMsg;
 
The final import statement generates the following error message:
 
"-cannot access dgi.CCMsg
-bad class file:  c:\jakarta-tomcat-4.0.3\common\classes\dgi\CCMsg.class
-class file contains wrong class: CCMsg
-Please remove or make sure it appears in the correct subdirectory of the classpath
-import dgi.CCMsg"
 
Obviously the compiler is finding my CCMsg.class, line two in the error message includes the correct path to my class.
 
Anybody have any ideas?
 
Thanks!
 
Frank
 
 
 

Reply via email to