• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlets in myeclipse  RSS feed

 
Sachitra Samarakoon
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a small EE application using MyEclipse, and when it runs it throws a runtime exception saying UnsupportedClassVersionError for the Servlets used in the application.
So, what should I do to prevent that and to make it work??
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
UnsupportedClassVersionError is thrown when the major/minor version of the .class file cannot be supported by the JVM runtime.

In practical, this means you compiled your classes higher version of Java and trying run in lower version of it.

Try to findout which version of Java the MyEclipse is using to compile the Servlet and then you run the Servlet container in same version.

Other option is change the MyEclipse java library version to match with the Servlet Runtime container one.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!