tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Schild" <chris.sch...@corridortechnology.com>
Subject Re: Compile error: class file contains wrong class, bad class file???
Date Thu, 23 Jan 2003 23:44:58 GMT
Sorry, I figured it out.  When I installed the Tomcat directory under
Apache.  The compiler was picking up %tomcat_home%/servlet.jar instead of
the servlet2_03/servlet.jar defined in the classpath....
ooopsss.


----- Original Message -----
From: "Chris Schild" <chris.schild@corridortechnology.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, January 23, 2003 4:35 PM
Subject: Compile error: class file contains wrong class, bad class file???


Hi all, here is the error I get...
C:\Java\JCreator LE\MyProjects\Email\Email.java:16: cannot access
ServletConfig
bad class file: C:\Java\servlet-2_3\javax\servlet\ServletConfig.class
class file contains wrong class: javax.servlet.ServletConfig
Please remove or make sure it appears in the correct subdirectory of the
classpath.

  code:
----------------------------------------------------------------------------
--

   public void init(ServletConfig config) throws ServletException
^1 error
----------------------------------------------------------------------------
--


I have searched for answer but I get nothing?!?
The classpath is set correctly -
C:\Java\classes;C:\Java\javamail-1_3\mail.jar;C:\Java\jaf-1_0_2\activation.j
ar;C:\Java\servlet-2_3\javax\servlet;C:\Java\jsp-1_2\servlet.jar
I can't think of anything else....
Any suggestions?
Here is the code up to the error:


  code:
----------------------------------------------------------------------------
--

// import the JavaMail packagesimport javax.mail.*;import
javax.mail.internet.*; // import the servlet packagesimport
javax.servlet.*;import javax.servlet.http.*; // import misc classes that we
needimport java.util.*;import java.io.*; public class Email extends
HttpServlet {   String smtpServer;      public void init(ServletConfig
config) throws ServletException   {       super.init(config);
// get the SMTP server from the servlet properties       smtpServer =
config.getInitParameter("smtpServer");   }      public void
doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException   {I get this error whether it is from
the DOS cmd line or from the case tool JCreator???Anybody know about this???


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message