Tomcat Ava. Lang. unsupportedclassversionerror: bad version number in. Class File

Source: Internet
Author: User

I am using Tomcat addon of XAMPP.

The following error occurs when running the JSP Example That comes with Tomcat:

 

 

Ava. Lang. unsupportedclassversionerror: bad version number in. Class File

 

JDK on my machine is .. 0_10. The location is as follows:

Set java_home = C:/program files/Java/jdk1.6.0 _ 10

 

The JDK used for Tomcat is still 1.5.

 

Solution:

 

Modify the JDK directory of Tomcat

 

Open tomcat/bin/Catalina. BAT and find the last statement shown below:

Rem $ ID: Catalina. Bat 656834 2008-05-15 21: 04: 04z Markt $

Rem ---------------------------------------------------------------------------

Add the following statement below the statement:

Rem jsse_home (optional) may point at your Java Secure Sockets Extension
REM (JSSE) installation, whose jar files will be added to
Rem system class path used to start Tomcat.
Rem
Rem jpda_transport (optional) JPDA transport used when the "JPDA start"
Rem command is executed. The default is "dt_shmem ".
Rem
Rem jpda_address (optional) Java runtime options used when the "JPDA start"
Rem command is executed. The default is "jdbconn ".
Rem
Rem $ ID: Catalina. Bat 355227 21: 44: 16z Keith $
Rem ---------------------------------------------------------------------------

Set java_home = C:/program files/Java/jdk1.6.0 _ 10

Note: The last statement is the JDK path, which depends on your JDK installation.

 

 

Restart tomcat.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.