A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Which version of "servlet-api.jar" should I download and from where ?
Joined: May 20, 2008
Jun 18, 2008 03:31:00
I am compiling a .java file using javac thru command prompt
Compiler throws this error,
bad class file: XXXX\servlet-api.jar (javax/servlet/http/HttpServletRequest.class)
class file has wrong version 49.0, should be 48.0
Please tell which version of this JAR should I download AND from where ?
Please reply asap. Thanks in Advance !
Jesper de Jong
Joined: Aug 16, 2005
Jun 18, 2008 06:54:00
Welcome to JavaRanch.
The error message that you get means that you are trying to use a JAR file which is for
5 and newer on JDK 1.4.
Where did you get that servlet-api.jar? Are you using
6.0? Note that Tomcat 6.0 requires Java 5 or newer, it will not work on Java 1.4.
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 8 API documentation
Joined: Nov 14, 2006
Nov 24, 2008 02:28:00
I am facing the same problem. I am using the JDK version 1.6.0_10. and tomcat 6.0.16. Do you think we need to change our Servlet-api.jar file with the older version..
~ Niket Shah
Author and ninkuma
Joined: Jan 10, 2002
Nov 24, 2008 08:49:00
No. Read Jesper's response.
Asking smart questions
Books by Bear
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Which version of "servlet-api.jar" should I download and from where ?
How many Claspath set for running struts application?
Netbeans + Servlets
compiling servlet and tomcat
error in the source file
Problems compiling servlet
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015