Link to home
Start Free TrialLog in
Avatar of APPIREDDY
APPIREDDY

asked on

BAD CLASS FILE

HI,

I have installed tomcat6.0,and set the class path to servlet-api.jar in the lib directory.
when i'm compiling the servlet i'm getting the error

C:\anu\cookbook programs>javac FirstServlet.java
FirstServlet.java:5: cannot access javax.servlet.http.HttpServlet
bad class file: C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar(javax/servlet/http/HttpServlet.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import javax.servlet.http.HttpServlet;
                          ^
1 error

C:\anu\cookbook programs>
Avatar of krishna kishore mellacheruvu venkata
krishna kishore mellacheruvu venkata
Flag of India image

please check whether there is another servlet.jar exists in the classpath or not?
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial